1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib:cmdline: Use getprogname() to avoid possible issues with setproctitle()

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun  8 14:58:58 UTC 2021 on sn-devel-184
This commit is contained in:
Stefan Metzmacher 2021-06-04 17:55:46 +02:00 committed by Andreas Schneider
parent d3c0d68aa1
commit 7645aca4d0

View File

@ -331,12 +331,7 @@ static void popt_samba_callback(poptContext popt_ctx,
bool ok;
/* Find out basename of current program */
pname = strrchr_m(poptGetInvocationName(popt_ctx), '/');
if (pname == NULL) {
pname = poptGetInvocationName(popt_ctx);
} else {
pname++;
}
pname = getprogname();
if (reason == POPT_CALLBACK_REASON_PRE) {
if (lp_ctx == NULL) {