Univention Bugzilla – Bug 54974
pam_runasroot univention-mount-homedir: Empty argv
Last modified: 2022-07-13 14:46:53 CEST
Warning from linux-4.19: $ dmesg -H > process 'cron' launched '/usr/sbin/univention-mount-homedir' with NULL argv: empty string added /etc/pam.d/cron > @include common-session /etc/pam.d/common-session > session required pam_runasroot.so program=/usr/sbin/univention-mount-homedir univention/ucs> base/pam-runasroo/pam_runasroot.c:279 > 279 »···»···»···»···execl ( prog, NULL ); <man:execl(3)> > The first argument, by convention, should point to the filename associated with the file being executed. > execl(prog, prog, NULL); Maybe change it to <man:execve(2)>? The following warnings exist: cc -O2 -D_GNU_SOURCE -D_REENTRANT -DLINUX_PAM -Wall -fPIC -Dlinux -DPAM_DYNAMIC -Di386 -c pam_runasroot.c -o dynamic/pam_runasroot.o pam_runasroot.c: In function ‘pam_sm_authenticate’: pam_runasroot.c:384:8: warning: the address of ‘demouserscript’ will always evaluate as ‘true’ [-Waddress] if ( demouserscript && *demouserscript != '\0') ^~~~~~~~~~~~~~ At top level: pam_runasroot.c:126:12: warning: ‘converse’ defined but not used [-Wunused-function] static int converse(pam_handle_t * pamh, int ctrl, int nargs ^~~~~~~~ pam_runasroot.c: In function ‘_pam_parse’: pam_runasroot.c:113:4: warning: ‘strncpy’ specified bound 8192 equals destination size [-Wstringop-truncation] strncpy(demouserscript,*argv+15,BUFSIZ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pam_runasroot.c:111:4: warning: ‘strncpy’ specified bound 8192 equals destination size [-Wstringop-truncation] strncpy(demouser,*argv+9,BUFSIZ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/security/pam_modules.h: In function ‘pam_sm_authenticate’: pam_runasroot.c:369:40: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] snprintf(demouser_prefix, BUFSIZ, "%s-", demouser); ^ pam_runasroot.c:369:2: note: ‘snprintf’ output between 2 and 8193 bytes into a destination of size 8192 snprintf(demouser_prefix, BUFSIZ, "%s-", demouser); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pam_runasroot.c:391:3: warning: ‘strncpy’ specified bound 8192 equals destination size [-Wstringop-truncation] strncpy(user, auth_user, BUFSIZ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~