Sophie

Sophie

distrib > Mandriva > cs4.0 > i586 > by-pkgid > d9e930954ff4caaca4b6c8b06e42f042 > files > 8

ppp-2.4.3-9.1.20060mdk.src.rpm

--- ppp-2.4.3/pppd/plugins/winbind.c.cve-2006-2194	2006-07-10 10:21:04.233671825 -0600
+++ ppp-2.4.3/pppd/plugins/winbind.c	2006-07-10 10:21:04.233671825 -0600
@@ -304,6 +304,7 @@
         }
 
 	if (forkret == 0) {
+		uid_t uid = getuid();
 		/* child process */
 		close(child_out[0]);
 		close(child_in[1]);
@@ -311,6 +312,10 @@
 		/* run winbind as the user that invoked pppd */
 		setgid(getgid());
 		setuid(getuid());
+		if (getuid() != uid) {
+			perror("pppd/winbind: could not setuid to orig uid");
+			exit(1);
+		}
 		execl("/bin/sh", "sh", "-c", ntlm_auth, NULL);  
 		perror("pppd/winbind: could not exec /bin/sh");
 		exit(1);