diff options
| author | Eli Zaretskii | 2009-03-21 11:31:50 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2009-03-21 11:31:50 +0000 |
| commit | 22749e9acb08d9a7ab78bdf930464b1f19012a63 (patch) | |
| tree | bddda2f8f67fc48f7dd3c184f0e109fecc0139d4 /src | |
| parent | cc15c0f2167a8fa39d80f5d29672ee9d9eebd418 (diff) | |
| download | emacs-22749e9acb08d9a7ab78bdf930464b1f19012a63.tar.gz emacs-22749e9acb08d9a7ab78bdf930464b1f19012a63.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/w32.c | 22 |
2 files changed, 19 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1f95b2846d5..d2f88a31fee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2009-03-21 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * w32.c (getpwuid): Change argument type to unsigned. | ||
| 4 | (struct w32_id): Change type of `rid' member to unsigned. | ||
| 5 | (w32_cached_id, w32_add_to_cache, get_name_and_id): Change type of | ||
| 6 | argument ID to unsigned. All callers changed. | ||
| 7 | (getuid, geteuid, getgid, getegid): Change return type to unsigned. | ||
| 8 | |||
| 1 | 2009-03-20 Eli Zaretskii <eliz@gnu.org> | 9 | 2009-03-20 Eli Zaretskii <eliz@gnu.org> |
| 2 | 10 | ||
| 3 | * editfns.c (Fuser_uid, Fuser_real_uid): If UID as EMACS_INT is | 11 | * editfns.c (Fuser_uid, Fuser_real_uid): If UID as EMACS_INT is |
| @@ -840,13 +840,13 @@ static struct group dflt_group = | |||
| 840 | 0, | 840 | 0, |
| 841 | }; | 841 | }; |
| 842 | 842 | ||
| 843 | int | 843 | unsigned |
| 844 | getuid () | 844 | getuid () |
| 845 | { | 845 | { |
| 846 | return dflt_passwd.pw_uid; | 846 | return dflt_passwd.pw_uid; |
| 847 | } | 847 | } |
| 848 | 848 | ||
| 849 | int | 849 | unsigned |
| 850 | geteuid () | 850 | geteuid () |
| 851 | { | 851 | { |
| 852 | /* I could imagine arguing for checking to see whether the user is | 852 | /* I could imagine arguing for checking to see whether the user is |
| @@ -855,20 +855,20 @@ geteuid () | |||
| 855 | return getuid (); | 855 | return getuid (); |
| 856 | } | 856 | } |
| 857 | 857 | ||
| 858 | int | 858 | unsigned |
| 859 | getgid () | 859 | getgid () |
| 860 | { | 860 | { |
| 861 | return dflt_passwd.pw_gid; | 861 | return dflt_passwd.pw_gid; |
| 862 | } | 862 | } |
| 863 | 863 | ||
| 864 | int | 864 | unsigned |
| 865 | getegid () | 865 | getegid () |
| 866 | { | 866 | { |
| 867 | return getgid (); | 867 | return getgid (); |
| 868 | } | 868 | } |
| 869 | 869 | ||
| 870 | struct passwd * | 870 | struct passwd * |
| 871 | getpwuid (int uid) | 871 | getpwuid (unsigned uid) |
| 872 | { | 872 | { |
| 873 | if (uid == dflt_passwd.pw_uid) | 873 | if (uid == dflt_passwd.pw_uid) |
| 874 | return &dflt_passwd; | 874 | return &dflt_passwd; |
| @@ -2894,7 +2894,7 @@ get_rid (PSID sid) | |||
| 2894 | #endif | 2894 | #endif |
| 2895 | 2895 | ||
| 2896 | struct w32_id { | 2896 | struct w32_id { |
| 2897 | int rid; | 2897 | unsigned rid; |
| 2898 | struct w32_id *next; | 2898 | struct w32_id *next; |
| 2899 | char name[GNLEN+1]; | 2899 | char name[GNLEN+1]; |
| 2900 | unsigned char sid[FLEXIBLE_ARRAY_MEMBER]; | 2900 | unsigned char sid[FLEXIBLE_ARRAY_MEMBER]; |
| @@ -2903,7 +2903,7 @@ struct w32_id { | |||
| 2903 | static struct w32_id *w32_idlist; | 2903 | static struct w32_id *w32_idlist; |
| 2904 | 2904 | ||
| 2905 | static int | 2905 | static int |
| 2906 | w32_cached_id (PSID sid, int *id, char *name) | 2906 | w32_cached_id (PSID sid, unsigned *id, char *name) |
| 2907 | { | 2907 | { |
| 2908 | struct w32_id *tail, *found; | 2908 | struct w32_id *tail, *found; |
| 2909 | 2909 | ||
| @@ -2926,7 +2926,7 @@ w32_cached_id (PSID sid, int *id, char *name) | |||
| 2926 | } | 2926 | } |
| 2927 | 2927 | ||
| 2928 | static void | 2928 | static void |
| 2929 | w32_add_to_cache (PSID sid, int id, char *name) | 2929 | w32_add_to_cache (PSID sid, unsigned id, char *name) |
| 2930 | { | 2930 | { |
| 2931 | DWORD sid_len; | 2931 | DWORD sid_len; |
| 2932 | struct w32_id *new_entry; | 2932 | struct w32_id *new_entry; |
| @@ -2953,7 +2953,7 @@ w32_add_to_cache (PSID sid, int id, char *name) | |||
| 2953 | 2953 | ||
| 2954 | static int | 2954 | static int |
| 2955 | get_name_and_id (PSECURITY_DESCRIPTOR psd, const char *fname, | 2955 | get_name_and_id (PSECURITY_DESCRIPTOR psd, const char *fname, |
| 2956 | int *id, char *nm, int what) | 2956 | unsigned *id, char *nm, int what) |
| 2957 | { | 2957 | { |
| 2958 | PSID sid = NULL; | 2958 | PSID sid = NULL; |
| 2959 | char machine[MAX_COMPUTERNAME_LENGTH+1]; | 2959 | char machine[MAX_COMPUTERNAME_LENGTH+1]; |
| @@ -3837,8 +3837,8 @@ system_process_attributes (pid) | |||
| 3837 | DWORD blen = 0; | 3837 | DWORD blen = 0; |
| 3838 | TOKEN_USER user_token; | 3838 | TOKEN_USER user_token; |
| 3839 | TOKEN_PRIMARY_GROUP group_token; | 3839 | TOKEN_PRIMARY_GROUP group_token; |
| 3840 | int euid; | 3840 | unsigned euid; |
| 3841 | int egid; | 3841 | unsigned egid; |
| 3842 | DWORD sess; | 3842 | DWORD sess; |
| 3843 | PROCESS_MEMORY_COUNTERS mem; | 3843 | PROCESS_MEMORY_COUNTERS mem; |
| 3844 | PROCESS_MEMORY_COUNTERS_EX mem_ex; | 3844 | PROCESS_MEMORY_COUNTERS_EX mem_ex; |