[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs nt/inc/pwd.h nt/inc/sys/stat.h lib-src/nt...
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs nt/inc/pwd.h nt/inc/sys/stat.h lib-src/nt... |
Date: |
Sat, 21 Mar 2009 11:29:29 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 09/03/21 11:29:29
Modified files:
nt/inc : pwd.h
nt/inc/sys : stat.h
lib-src : ntlib.h ntlib.c
src : w32.c
Log message:
inc/sys/stat.h (struct stat): Change the types of st_uid and st_gid to
unsigned.
inc/pwd.h (struct passwd): Change the types of pw_uid and pw_gid to
unsigned.
(getpwuid): Argument is now unsigned.
uid_t is now unsigned.
ntlib.c (setuid): Argument is now unsigned.
(getuid): Return value is now unsigned.
(getpwuid): Argument is now unsigned.
(fchown): UID and GID arguments are now unsigned.
ntlib.h (fchown): UID and GID arguments are now unsigned.
(getuid): Return value is now unsigned.
(setuid): Argument is now unsigned.
(getpwuid): Remove prototype (it's declared in nt/inc/pwd.h).
w32.c (getpwuid): Change argument type to unsigned.
(struct w32_id): Change type of `rid' member to unsigned.
(w32_cached_id, w32_add_to_cache, get_name_and_id): Change type
of
argument ID to unsigned. All callers changed.
(getuid, geteuid, getgid, getegid): Change return type to
unsigned.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/nt/inc/pwd.h?cvsroot=emacs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/emacs/nt/inc/sys/stat.h?cvsroot=emacs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/emacs/lib-src/ntlib.h?cvsroot=emacs&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/emacs/lib-src/ntlib.c?cvsroot=emacs&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/emacs/src/w32.c?cvsroot=emacs&r1=1.160&r2=1.161
Patches:
Index: nt/inc/pwd.h
===================================================================
RCS file: /cvsroot/emacs/emacs/nt/inc/pwd.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- nt/inc/pwd.h 4 Jun 2005 20:25:50 -0000 1.5
+++ nt/inc/pwd.h 21 Mar 2009 11:29:28 -0000 1.6
@@ -7,19 +7,19 @@
struct passwd {
char *pw_name;
char *pw_passwd;
- int pw_uid;
- int pw_gid;
+ unsigned pw_uid; /* Vista's TrustedInstaller has a very large RID */
+ unsigned pw_gid;
int pw_quota;
char *pw_gecos;
char *pw_dir;
char *pw_shell;
};
-typedef int uid_t;
+typedef unsigned uid_t;
typedef uid_t gid_t;
struct passwd * getpwnam (char *);
-struct passwd * getpwuid (int);
+struct passwd * getpwuid (unsigned);
#endif /* _PWD_H_ */
Index: nt/inc/sys/stat.h
===================================================================
RCS file: /cvsroot/emacs/emacs/nt/inc/sys/stat.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- nt/inc/sys/stat.h 8 Jan 2009 03:28:20 -0000 1.6
+++ nt/inc/sys/stat.h 21 Mar 2009 11:29:29 -0000 1.7
@@ -61,8 +61,8 @@
dev_t st_dev;
unsigned short st_mode;
short st_nlink;
- int st_uid;
- int st_gid;
+ unsigned st_uid; /* Vista's TrustedInstaller has a very large RID */
+ unsigned st_gid;
unsigned __int64 st_size;
dev_t st_rdev;
time_t st_atime;
Index: lib-src/ntlib.h
===================================================================
RCS file: /cvsroot/emacs/emacs/lib-src/ntlib.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- lib-src/ntlib.h 8 Jan 2009 03:38:52 -0000 1.17
+++ lib-src/ntlib.h 21 Mar 2009 11:29:29 -0000 1.18
@@ -35,11 +35,10 @@
int getppid(void);
char * getlogin ();
char * cuserid (char * s);
-int getuid ();
-int setuid (int uid);
-struct passwd * getpwuid (int uid);
+unsigned getuid ();
+int setuid (unsigned uid);
char * getpass (const char * prompt);
-int fchown (int fd, int uid, int gid);
+int fchown (int fd, unsigned uid, unsigned gid);
#ifndef BSTRING
#define bzero(b, l) memset(b, 0, l)
Index: lib-src/ntlib.c
===================================================================
RCS file: /cvsroot/emacs/emacs/lib-src/ntlib.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- lib-src/ntlib.c 8 Jan 2009 03:38:52 -0000 1.19
+++ lib-src/ntlib.c 21 Mar 2009 11:29:29 -0000 1.20
@@ -119,20 +119,20 @@
return name;
}
-int
+unsigned
getuid ()
{
return 0;
}
int
-setuid (int uid)
+setuid (unsigned uid)
{
return 0;
}
struct passwd *
-getpwuid (int uid)
+getpwuid (unsigned uid)
{
return NULL;
}
@@ -185,7 +185,7 @@
}
int
-fchown (int fd, int uid, int gid)
+fchown (int fd, unsigned uid, unsigned gid)
{
return 0;
}
Index: src/w32.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32.c,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -b -r1.160 -r1.161
--- src/w32.c 8 Jan 2009 03:16:03 -0000 1.160
+++ src/w32.c 21 Mar 2009 11:29:29 -0000 1.161
@@ -840,13 +840,13 @@
0,
};
-int
+unsigned
getuid ()
{
return dflt_passwd.pw_uid;
}
-int
+unsigned
geteuid ()
{
/* I could imagine arguing for checking to see whether the user is
@@ -855,20 +855,20 @@
return getuid ();
}
-int
+unsigned
getgid ()
{
return dflt_passwd.pw_gid;
}
-int
+unsigned
getegid ()
{
return getgid ();
}
struct passwd *
-getpwuid (int uid)
+getpwuid (unsigned uid)
{
if (uid == dflt_passwd.pw_uid)
return &dflt_passwd;
@@ -2894,7 +2894,7 @@
#endif
struct w32_id {
- int rid;
+ unsigned rid;
struct w32_id *next;
char name[GNLEN+1];
unsigned char sid[FLEXIBLE_ARRAY_MEMBER];
@@ -2903,7 +2903,7 @@
static struct w32_id *w32_idlist;
static int
-w32_cached_id (PSID sid, int *id, char *name)
+w32_cached_id (PSID sid, unsigned *id, char *name)
{
struct w32_id *tail, *found;
@@ -2926,7 +2926,7 @@
}
static void
-w32_add_to_cache (PSID sid, int id, char *name)
+w32_add_to_cache (PSID sid, unsigned id, char *name)
{
DWORD sid_len;
struct w32_id *new_entry;
@@ -2953,7 +2953,7 @@
static int
get_name_and_id (PSECURITY_DESCRIPTOR psd, const char *fname,
- int *id, char *nm, int what)
+ unsigned *id, char *nm, int what)
{
PSID sid = NULL;
char machine[MAX_COMPUTERNAME_LENGTH+1];
@@ -3837,8 +3837,8 @@
DWORD blen = 0;
TOKEN_USER user_token;
TOKEN_PRIMARY_GROUP group_token;
- int euid;
- int egid;
+ unsigned euid;
+ unsigned egid;
DWORD sess;
PROCESS_MEMORY_COUNTERS mem;
PROCESS_MEMORY_COUNTERS_EX mem_ex;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs nt/inc/pwd.h nt/inc/sys/stat.h lib-src/nt...,
Eli Zaretskii <=