diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-07-29 05:05:36 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-07-29 05:05:36 +0000 |
commit | fb08c34cf3950f994701a9c98c89670f6346f7ab (patch) | |
tree | d24bacbacb7c84d89c52c2e7742a4fe4bea537b2 /source3/include | |
parent | 73dc9870af658dfe467e33ecefe2d740a0d0dbb0 (diff) | |
download | samba-fb08c34cf3950f994701a9c98c89670f6346f7ab.tar.gz samba-fb08c34cf3950f994701a9c98c89670f6346f7ab.tar.bz2 samba-fb08c34cf3950f994701a9c98c89670f6346f7ab.zip |
get rid of the runtime test for broken getgroups() and add a compile
time test instead. This also allows us to get rid of the igroups
element of a couple of structures.
(This used to be commit 8b25fe734166b76ceebf8d9543c706ebe0fddc96)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/config.h.in | 1 | ||||
-rw-r--r-- | source3/include/includes.h | 6 | ||||
-rw-r--r-- | source3/include/proto.h | 5 | ||||
-rw-r--r-- | source3/include/smb.h | 15 |
4 files changed, 15 insertions, 12 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in index 3bc3e95e4f..dbbd5431a2 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -104,6 +104,7 @@ #undef WITH_NISPLUS #undef WITH_AUTOMOUNT #undef HAVE_PAM_AUTHENTICATE +#undef HAVE_BROKEN_GETGROUPS /* The number of bytes in a int. */ #undef SIZEOF_INT diff --git a/source3/include/includes.h b/source3/include/includes.h index b63787fd5e..2a420f76ed 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -287,6 +287,12 @@ extern char *sys_errlist[]; extern int errno; #endif +#ifdef HAVE_BROKEN_GETGROUPS +#define GID_T int +#else +#define GID_T gid_t +#endif + /* Lists, trees, caching, datbase... */ #include "ubi_sLinkList.h" diff --git a/source3/include/proto.h b/source3/include/proto.h index 523d7c9615..c8c0cc8145 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1661,8 +1661,7 @@ BOOL last_challenge(unsigned char *challenge); user_struct *get_valid_user_struct(uint16 vuid); void invalidate_vuid(uint16 vuid); char *validated_username(uint16 vuid); -int setup_groups(char *user, int uid, int gid, int *p_ngroups, - int **p_igroups, gid_t **p_groups); +int setup_groups(char *user, int uid, int gid, int *p_ngroups, GID_T **p_groups); uint16 register_vuid(int uid,int gid, char *unix_name, char *requested_name, BOOL guest); void add_session_user(char *user); BOOL update_smbpassword_file( char *user, fstring password); @@ -1984,7 +1983,7 @@ void *mem_dup( void *from, int size ); void array_promote(char *array,int elsize,int element); void set_socket_options(int fd, char *options); void close_sockets(void ); -BOOL in_group(gid_t group, int current_gid, int ngroups, int *groups); +BOOL in_group(gid_t group, int current_gid, int ngroups, GID_T *groups); char *StrCpy(char *dest,char *src); char *StrnCpy(char *dest,char *src,int n); void putip(void *dest,void *src); diff --git a/source3/include/smb.h b/source3/include/smb.h index 1c37aab7e2..8d846d4531 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -386,11 +386,10 @@ struct cli_state { struct current_user { - int cnum, vuid; - int uid, gid; - int ngroups; - gid_t *groups; - int *igroups; + int cnum, vuid; + int uid, gid; + int ngroups; + GID_T *groups; }; typedef struct @@ -500,8 +499,7 @@ typedef struct /* This groups info is valid for the user that *opened* the connection */ int ngroups; - gid_t *groups; - int *igroups; /* an integer version - some OSes are broken :-( */ + GID_T *groups; time_t lastused; BOOL used; @@ -537,8 +535,7 @@ typedef struct /* following groups stuff added by ih */ /* This groups info is needed for when we become_user() for this uid */ int n_groups; - gid_t *groups; - int *igroups; /* an integer version - some OSes are broken :-( */ + GID_T *groups; int n_sids; int *sids; |