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
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) {