Package: libpam-chroot
Followup-For: Bug #853502

Dear Maintainer,

Attached please find a patch that fixes this bug.  It also addresses #754322.

Thanks,

Jason


-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: ia64

Kernel: Linux 3.14-0.bpo.2-mckinley (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
--- libpam-chroot-0.9/pam_chroot.c      2018-01-10 14:20:17.000000000 +0000
+++ libpam-chroot-0.9-fixed/pam_chroot.c        2018-01-10 14:05:39.275066056 
+0000
@@ -187,7 +187,7 @@
        char **uptr;
 
        if(NULL == user || NULL == ngrps) { return -1; }
-       if(0 > *ngrps || 0 > gid) { return -1; }
+       if(0 > *ngrps) { return -1; }
 
        if(gcount < *ngrps) {
                if(NULL != grps) { grps[gcount] = gid; }
@@ -870,7 +870,7 @@
                        break;
 
                default:
-                       if(opts.flags * _PAM_OPTS_DEBUG) {
+                       if(opts.flags & _PAM_OPTS_DEBUG) {
                                _pam_log(LOG_NOTICE, "%s: returning failure", 
opts.module);
                        }
                        err = PAM_SESSION_ERR;

Reply via email to