summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2010-04-03 04:16:16 +0200
committerJuanma Barranquero <lekktu@gmail.com>2010-04-03 04:16:16 +0200
commit3bc26a045f60c96c78902d84b4bb8da28ffd1c81 (patch)
treec222cc13832a677584b9c351d24fd9e458aaad2d /lib-src
parentccce93dfafc19aa0c55bddd36a5a61b5a54089b1 (diff)
downloademacs-3bc26a045f60c96c78902d84b4bb8da28ffd1c81.tar.gz
Add stubs for Windows, required after CVE-2010-0825 change.
* ntlib.c (getgid, getegid, setegid): New stubs. * ntlib.h (getgid, getegid, setegid): Declare them.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog6
-rw-r--r--lib-src/ntlib.c18
-rw-r--r--lib-src/ntlib.h3
3 files changed, 27 insertions, 0 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 826f5c4e6ad..a68629d2393 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);