View | Details | Raw Unified | Return to bug 195984
Collapse All | Expand All

(-)usr.sbin/jail/command.c (+5 lines)
Lines 667-672 Link Here
667
			if (term != NULL)
667
			if (term != NULL)
668
				setenv("TERM", term, 1);
668
				setenv("TERM", term, 1);
669
		}
669
		}
670
		if (setgid(pwd->pw_gid) < 0) {
671
			jail_warnx(j, "setgid %d: %s", pwd->pw_gid,
672
			    strerror(errno));
673
			exit(1);
674
		}
670
		if (setusercontext(lcap, pwd, pwd->pw_uid, username
675
		if (setusercontext(lcap, pwd, pwd->pw_uid, username
671
		    ? LOGIN_SETALL & ~LOGIN_SETGROUP & ~LOGIN_SETLOGIN
676
		    ? LOGIN_SETALL & ~LOGIN_SETGROUP & ~LOGIN_SETLOGIN
672
		    : LOGIN_SETPATH | LOGIN_SETENV) < 0) {
677
		    : LOGIN_SETPATH | LOGIN_SETENV) < 0) {

Return to bug 195984