Date: Tue, 16 Dec 2014 03:21:31 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 195759] x11/slim fails to honour login.conf Message-ID: <bug-195759-13-Pag7P3coSZ@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-195759-13@https.bugs.freebsd.org/bugzilla/> References: <bug-195759-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195759 --- Comment #4 from Henry Hu <henry.hu.sh@gmail.com> --- (In reply to Jonathan Chen from comment #3) > I had a quick look, and I believe that patch-switchuser.cpp should make use > of setusercontext() in login_class(3); instead of just setlogin(2). Nice catch. It seems like that we can replace multiple calls with a single setusercontext(): setlogin -> LOGIN_SETLOGIN initgroups, setgid -> LOGIN_SETGROUP setuid -> LOGIN_SETUSER and other problems are solved as well: path -> LOGIN_SETPATH lang -> LOGIN_SETENV seems like that we should just use LOGIN_SETALL. To get the login_cap_t, currently I'm using login_getpwclass(). I should use login_getuserclass() at the same time, and query the later one first, and turn to the first one if something is not present in the later one. However, setusercontext() does not support this, so just use login_getpwclass() for now. I've created a patch for this. Please test it. I'm not sure if all these APIs are present on older systems. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-195759-13-Pag7P3coSZ>