mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +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:
parent
d3c0d68aa1
commit
7645aca4d0
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user