View | Details | Raw Unified | Return to bug 1567 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-5 / +6 lines)
Line  Link Here
0
-- session.c   2009-08-20 07:20:50.000000000 +0100
0
++ session_new.c       2009-11-20 12:07:01.572478232 +0000
Lines 1521-1526 do_setusercontext(struct passwd *pw) Link Here
1521
               }
1521
               }
1522
# endif /* USE_LIBIAF */
1522
# endif /* USE_LIBIAF */
1523
#endif
1523
#endif
1524
#ifdef HAVE_SETPCRED
1525
               char *creds[] = { "REAL_USER=root", NULL };
1526
                if (setpcred(pw->pw_name, options.chroot_directory == NULL ? (char **)NULL : creds) == -1)
1527
                       fatal("Failed to set process credentials");
1528
#endif /* HAVE_SETPCRED */
1524
               if (options.chroot_directory != NULL &&
1529
               if (options.chroot_directory != NULL &&
1525
                   strcasecmp(options.chroot_directory, "none") != 0) {
1530
                   strcasecmp(options.chroot_directory, "none") != 0) {
Lines 1533-1542 do_setusercontext(struct passwd *pw) Link Here
1533
                       free(chroot_path);
1538
                       free(chroot_path);
1534
               }
1539
               }
1535
#ifdef HAVE_SETPCRED
1536
               if (setpcred(pw->pw_name, (char **)NULL) == -1)
1537
                       fatal("Failed to set process credentials");
1538
#endif /* HAVE_SETPCRED */
1539
#ifdef HAVE_LOGIN_CAP
1540
#ifdef HAVE_LOGIN_CAP
1540
               if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) {
1541
               if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) {
1541
                       perror("unable to set user context (setuser)");
1542
                       perror("unable to set user context (setuser)");

Return to bug 1567