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 3764 - (show annotations) (download)
Thu Jun 12 10:50:08 2008 UTC (5 years, 8 months ago) by markus
File size: 710 byte(s)
reverted the patches somone removed ... and fixed them
1 --- dropbear-0.51/svr-chansession.c.orig 2008-06-12 09:58:01.000000000 +0200
2 +++ dropbear-0.51/svr-chansession.c 2008-06-12 10:04:16.000000000 +0200
3 @@ -912,12 +912,12 @@
4 /* We can only change uid/gid as root ... */
5 if (getuid() == 0) {
6
7 - if ((setgid(ses.authstate.pw_gid) < 0) ||
8 + if ((ses.authstate.pw_gid != 0) && ((setgid(ses.authstate.pw_gid) < 0) ||
9 (initgroups(ses.authstate.pw_name,
10 - ses.authstate.pw_gid) < 0)) {
11 + ses.authstate.pw_gid) < 0))) {
12 dropbear_exit("error changing user group");
13 }
14 - if (setuid(ses.authstate.pw_uid) < 0) {
15 + if ((ses.authstate.pw_uid != 0) && (setuid(ses.authstate.pw_uid) < 0)) {
16 dropbear_exit("error changing user");
17 }
18 } else {

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