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

Collapse All | Expand All

(-)session.c (-8 / +7 lines)
Lines 1466-1476 do_setusercontext(struct passwd *pw) Link Here
1466
	if (getuid() == 0 || geteuid() == 0)
1466
	if (getuid() == 0 || geteuid() == 0)
1467
#endif /* HAVE_CYGWIN */
1467
#endif /* HAVE_CYGWIN */
1468
	{
1468
	{
1469
1470
#ifdef HAVE_SETPCRED
1471
		if (setpcred(pw->pw_name, (char **)NULL) == -1)
1472
			fatal("Failed to set process credentials");
1473
#endif /* HAVE_SETPCRED */
1474
#ifdef HAVE_LOGIN_CAP
1469
#ifdef HAVE_LOGIN_CAP
1475
# ifdef __bsdi__
1470
# ifdef __bsdi__
1476
		setpgid(0, 0);
1471
		setpgid(0, 0);
Lines 1517-1525 do_setusercontext(struct passwd *pw) Link Here
1517
# if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)
1512
# if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)
1518
		irix_setusercontext(pw);
1513
		irix_setusercontext(pw);
1519
# endif /* defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) */
1514
# endif /* defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) */
1520
# ifdef _AIX
1521
		aix_usrinfo(pw);
1522
# endif /* _AIX */
1523
# ifdef USE_LIBIAF
1515
# ifdef USE_LIBIAF
1524
		if (set_id(pw->pw_name) != 0) {
1516
		if (set_id(pw->pw_name) != 0) {
1525
			exit(1);
1517
			exit(1);
Lines 1538-1543 do_setusercontext(struct passwd *pw) Link Here
1538
			free(chroot_path);
1530
			free(chroot_path);
1539
		}
1531
		}
1540
1532
1533
#ifdef HAVE_SETPCRED
1534
		if (setpcred(pw->pw_name, (char **)NULL) == -1)
1535
			fatal("Failed to set process credentials");
1536
#endif /* HAVE_SETPCRED */
1537
# ifdef _AIX
1538
		aix_usrinfo(pw);
1539
# endif /* _AIX */
1541
#ifdef HAVE_LOGIN_CAP
1540
#ifdef HAVE_LOGIN_CAP
1542
		if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) {
1541
		if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) {
1543
			perror("unable to set user context (setuser)");
1542
			perror("unable to set user context (setuser)");

Return to bug 1567