From: Juanma Barranquero <lekktu@gmail.com>
Date: Sat, 3 Apr 2010 02:23:51 +0000 (+0200)
Subject: Add stubs for Windows, required after CVE-2010-0825 change.
X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~597
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b372fceb03fbd2f2ff2e113d1da1a3013766837e;p=emacs.git

Add stubs for Windows, required after CVE-2010-0825 change.
* ntlib.c (getgid, getegid, setegid): New stubs.
* ntlib.h (getgid, getegid, setegid): Declare them.
---

diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 4a6942db5b8..26790dd17fa 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-03  Juanma Barranquero  <lekktu@gmail.com>
+
+	Add stubs for Windows, required after CVE-2010-0825 change.
+	* ntlib.c (getgid, getegid, setegid): New stubs.
+	* ntlib.h (getgid, getegid, setegid): Declare them.
+
 2010-04-02  Dan Rosenberg  <dan.j.rosenberg@gmail.com>  (tiny change)
 
 	* movemail.c (main): Check return values of setuid.  Avoid
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c
index ae10caecd22..c815f32d51d 100644
--- a/lib-src/ntlib.c
+++ b/lib-src/ntlib.c
@@ -125,12 +125,30 @@ getuid ()
   return 0;
 }
 
+unsigned
+getgid ()
+{
+  return 0;
+}
+
+unsigned
+getegid ()
+{
+  return 0;
+}
+
 int
 setuid (unsigned uid)
 {
   return 0;
 }
 
+int
+setegid (unsigned gid)
+{
+  return 0;
+}
+
 struct passwd *
 getpwuid (unsigned uid)
 {
diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h
index 70b99d7a779..ab1e7ba2866 100644
--- a/lib-src/ntlib.h
+++ b/lib-src/ntlib.h
@@ -36,7 +36,10 @@ int getppid(void);
 char * getlogin ();
 char * cuserid (char * s);
 unsigned getuid ();
+unsigned getegid ();
+unsigned getgid ();
 int setuid (unsigned uid);
+int setegid (unsigned gid);
 char * getpass (const char * prompt);
 int fchown (int fd, unsigned uid, unsigned gid);