projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
package/dropbear: use new service wrapper
[openwrt.git]
/
package
/
dropbear
/
patches
/
110-change_user.patch
diff --git
a/package/dropbear/patches/110-change_user.patch
b/package/dropbear/patches/110-change_user.patch
index
964229b
..
f003c27
100644
(file)
--- a/
package/dropbear/patches/110-change_user.patch
+++ b/
package/dropbear/patches/110-change_user.patch
@@
-1,6
+1,6
@@
--- a/svr-chansession.c
+++ b/svr-chansession.c
--- a/svr-chansession.c
+++ b/svr-chansession.c
-@@ -8
52,12 +852
,12 @@ static void execchild(void *user_data) {
+@@ -8
81,12 +881
,12 @@ static void execchild(void *user_data) {
/* We can only change uid/gid as root ... */
if (getuid() == 0) {
/* We can only change uid/gid as root ... */
if (getuid() == 0) {
@@
-9,10
+9,10
@@
(initgroups(ses.authstate.pw_name,
- ses.authstate.pw_gid) < 0)) {
+ ses.authstate.pw_gid) < 0))) {
(initgroups(ses.authstate.pw_name,
- ses.authstate.pw_gid) < 0)) {
+ ses.authstate.pw_gid) < 0))) {
- dropbear_exit("
e
rror changing user group");
+ dropbear_exit("
E
rror changing user group");
}
- if (setuid(ses.authstate.pw_uid) < 0) {
+ if ((ses.authstate.pw_uid != 0) && (setuid(ses.authstate.pw_uid) < 0)) {
}
- if (setuid(ses.authstate.pw_uid) < 0) {
+ if ((ses.authstate.pw_uid != 0) && (setuid(ses.authstate.pw_uid) < 0)) {
- dropbear_exit("
e
rror changing user");
+ dropbear_exit("
E
rror changing user");
}
} else {
}
} else {
This page took
0.026301 seconds
and
4
git commands to generate.