English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Contents of /branches/freewrt_1_0/package/dropbear/patches/110-change_user.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 744 - (show annotations) (download)
Thu Sep 28 10:42:55 2006 UTC (7 years, 4 months ago) by wbx
File size: 811 byte(s)
create stable branch, feature freeze, please send svn diff patches to wbx
1 diff -urN dropbear.old/svr-chansession.c dropbear.dev/svr-chansession.c
2 --- dropbear.old/svr-chansession.c 2005-12-09 06:42:33.000000000 +0100
3 +++ dropbear.dev/svr-chansession.c 2005-12-12 01:42:38.982034750 +0100
4 @@ -860,12 +860,12 @@
5 /* We can only change uid/gid as root ... */
6 if (getuid() == 0) {
7
8 - if ((setgid(ses.authstate.pw->pw_gid) < 0) ||
9 + if ((ses.authstate.pw->pw_gid != 0) && ((setgid(ses.authstate.pw->pw_gid) < 0) ||
10 (initgroups(ses.authstate.pw->pw_name,
11 - ses.authstate.pw->pw_gid) < 0)) {
12 + ses.authstate.pw->pw_gid) < 0))) {
13 dropbear_exit("error changing user group");
14 }
15 - if (setuid(ses.authstate.pw->pw_uid) < 0) {
16 + if ((ses.authstate.pw->pw_uid != 0) && (setuid(ses.authstate.pw->pw_uid) < 0)) {
17 dropbear_exit("error changing user");
18 }
19 } else {

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20