]> granicus.if.org Git - sudo/commitdiff
Fix passing of login class back to sudo front end.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Mar 2011 21:55:08 +0000 (16:55 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Mar 2011 21:55:08 +0000 (16:55 -0500)
plugins/sudoers/set_perms.c
plugins/sudoers/sudoers.c

index 3899b2170c2a8a8668e736c2744c4431f9458102..39eec24569911ff3a6c41f9de471bb009586bf6e 100644 (file)
@@ -44,9 +44,6 @@
 #include <pwd.h>
 #include <errno.h>
 #include <grp.h>
-#ifdef HAVE_LOGIN_CAP_H
-# include <login_cap.h>
-#endif
 
 #include "sudoers.h"
 
index 4c141af67ccb0ae53f9fd6a567c113c3ddb601b6..3dd6c27ed024b5602d7ed9c4aae649bf7e370928 100644 (file)
@@ -643,6 +643,10 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
     }
     if (def_closefrom >= 0)
        easprintf(&command_info[info_len++], "closefrom=%d", def_closefrom);
+#ifdef HAVE_LOGIN_CAP_H
+    if (lc != NULL)
+       command_info[info_len++] = fmt_string("login_class", lc->lc_class);
+#endif /* HAVE_LOGIN_CAP_H */
 #ifdef HAVE_SELINUX
     if (user_role != NULL)
        command_info[info_len++] = fmt_string("selinux_role", user_role);