Re: login: PAM-only, login.defs, -H

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 17, Karel Zak wrote:

>  Git tree: https://karelzak@xxxxxxxxxx/karelzak/util-linux.git branch 'login'.
>  URL: https://github.com/karelzak/util-linux/tree/login

Ok, I found one bug: pam_setcred() is only called after pam_open_session(),
but has to be called before:

--- a/login-utils/login.c
+++ b/login-utils/login.c
@@ -868,15 +868,15 @@ static void loginpam_session(struct login_context *cxt)
        int rc;
        pam_handle_t *pamh = cxt->pamh;
 
-       rc = pam_open_session(pamh, 0);
-       if (is_pam_failure(rc))
-               loginpam_err(pamh, rc);
-
        rc = pam_setcred(pamh, PAM_ESTABLISH_CRED);
        if (is_pam_failure(rc)) {
                pam_close_session(pamh, 0);
                loginpam_err(pamh, rc);
        }
+
+       rc = pam_open_session(pamh, 0);
+       if (is_pam_failure(rc))
+               loginpam_err(pamh, rc);
 }
 


Another problem with current git is:
prlimit.c: In function ‘prlimit’:
prlimit.c:142:17: error: ‘SYS_prlimit64’ undeclared (first use in this function)
prlimit.c:142:17: note: each undeclared identifier is reported only once for each function it appears in

  Thorsten

-- 
Thorsten Kukuk, Project Manager/Release Manager SLES
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux