diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/client.h | 8 | ||||
-rw-r--r-- | source3/include/ntdomain.h | 4 | ||||
-rw-r--r-- | source3/include/proto.h | 19 | ||||
-rw-r--r-- | source3/include/smb.h | 35 |
4 files changed, 34 insertions, 32 deletions
diff --git a/source3/include/client.h b/source3/include/client.h index dde377f484..2b71b37524 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -58,10 +58,10 @@ struct pwd_info struct cli_state { int fd; - int cnum; - int pid; - int mid; - int uid; + uint16 cnum; + uint16 pid; + uint16 mid; + uint16 vuid; int protocol; int sec_mode; int rap_error; diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index efe7e663a0..8362dcb73f 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -58,7 +58,7 @@ typedef struct pipes_struct struct pipes_struct *next, *prev; int pnum; connection_struct *conn; - int uid; + uint16 vuid; BOOL open; /* open connection */ uint16 device_state; fstring name; @@ -88,7 +88,7 @@ struct api_struct { char *name; uint8 opnum; - void (*fn) (int uid, prs_struct*, prs_struct*); + void (*fn) (uint16 vuid, prs_struct*, prs_struct*); }; struct mem_desc diff --git a/source3/include/proto.h b/source3/include/proto.h index 38d02becea..4f29b3ae20 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5,7 +5,7 @@ /*The following definitions come from client/client.c */ -void do_dir(char *inbuf,char *outbuf,char *Mask,int attribute,void (*fn)(file_info *),BOOL recurse_dir, BOOL dirstoo); +void do_dir(char *inbuf,char *outbuf,char *mask,int attribute,void (*fn)(file_info *),BOOL recurse_dir, BOOL dirstoo); char *complete_cmd_null(char *text, int state); void complete_process_file(file_info *f); char *complete_remote_file(char *text, int state); @@ -180,13 +180,14 @@ int dos_utime(char *fname,struct utimbuf *times); int dos_rename(char *from, char *to); int dos_chmod(char *fname,mode_t mode); char *dos_getwd(char *s); -int sys_chown(char *fname,int uid,int gid); +int sys_chown(char *fname,uid_t uid,gid_t gid); int sys_chroot(char *dname); struct hostent *sys_gethostbyname(char *name); BOOL set_process_capability( uint32 cap_flag, BOOL enable ); BOOL set_inherited_process_capability( uint32 cap_flag, BOOL enable ); long sys_random(void); void sys_srandom(unsigned int seed); +int sys_getgroups(int setlen, gid_t *gidset); /*The following definitions come from lib/time.c */ @@ -227,7 +228,7 @@ BOOL next_token(char **ptr,char *buff,char *sep, int bufsize); char **toktocliplist(int *ctok, char *sep); void set_socket_options(int fd, char *options); void close_sockets(void ); -BOOL in_group(gid_t group, int current_gid, int ngroups, GID_T *groups); +BOOL in_group(gid_t group, gid_t 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); @@ -315,8 +316,8 @@ BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); int PutUniCode(char *dst,char *src); struct hostent *Get_Hostbyname(char *name); BOOL process_exists(int pid); -char *uidtoname(int uid); -char *gidtoname(int gid); +char *uidtoname(uid_t uid); +char *gidtoname(gid_t gid); void smb_panic(char *why); char *readdirname(void *p); BOOL is_in_path(char *name, name_compare_entry *namelist); @@ -400,7 +401,7 @@ BOOL cli_initialise(struct cli_state *cli); void cli_shutdown(struct cli_state *cli); void cli_error(struct cli_state *cli, int *eclass, int *num); void cli_sockopt(struct cli_state *cli, char *options); -int cli_setpid(struct cli_state *cli, int pid); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); BOOL cli_reestablish_connection(struct cli_state *cli); BOOL cli_establish_connection(struct cli_state *cli, char *dest_host, struct in_addr *dest_ip, @@ -482,7 +483,7 @@ void SamOEMhash( unsigned char *data, unsigned char *key, int val); void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); void E_md4hash(uchar *passwd, uchar *p16); void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], char *c8, uchar p24[24]); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); /*The following definitions come from libsmb/smberr.c */ @@ -2036,8 +2037,8 @@ BOOL set_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, GID_T **p_groups); -uint16 register_vuid(int uid,int gid, char *unix_name, char *requested_name, BOOL guest); +int setup_groups(char *user, uid_t uid, gid_t gid, int *p_ngroups, gid_t **p_groups); +uint16 register_vuid(uid_t uid,gid_t gid, char *unix_name, char *requested_name, BOOL guest); void add_session_user(char *user); BOOL smb_password_check(char *password, unsigned char *part_passwd, unsigned char *c8); BOOL smb_password_ok(struct smb_passwd *smb_pass, diff --git a/source3/include/smb.h b/source3/include/smb.h index f42951ec59..56b0e3bc24 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -345,8 +345,8 @@ struct sam_passwd char *unknown_str ; /* don't know what this is, yet. */ char *munged_dial ; /* munged path name and dial-back tel number */ - int smb_userid; /* this is actually the unix uid_t */ - int smb_grpid; /* this is actually the unix gid_t */ + uid_t smb_userid; /* this is actually the unix uid_t */ + gid_t smb_grpid; /* this is actually the unix gid_t */ uint32 user_rid; /* Primary User ID */ uint32 group_rid; /* Primary Group ID */ @@ -366,7 +366,7 @@ struct sam_passwd struct smb_passwd { - int smb_userid; /* this is actually the unix uid_t */ + uid_t smb_userid; /* this is actually the unix uid_t */ char *smb_name; /* username string */ unsigned char *smb_passwd; /* Null if no password */ @@ -447,7 +447,7 @@ typedef struct struct uid_cache { int entries; - int list[UID_CACHE_SIZE]; + uid_t list[UID_CACHE_SIZE]; }; typedef struct @@ -472,8 +472,8 @@ typedef struct connection_struct char *connectpath; char *origpath; char *user; /* name of user who *opened* this connection */ - int uid; /* uid of user who *opened* this connection */ - int gid; /* gid of user who *opened* this connection */ + uid_t uid; /* uid of user who *opened* this connection */ + gid_t gid; /* gid of user who *opened* this connection */ uint16 vuid; /* vuid of user who *opened* this connection, or UID_FIELD_INVALID */ @@ -481,7 +481,7 @@ typedef struct connection_struct /* This groups info is valid for the user that *opened* the connection */ int ngroups; - GID_T *groups; + gid_t *groups; time_t lastused; BOOL used; @@ -494,10 +494,11 @@ typedef struct connection_struct struct current_user { connection_struct *conn; - int vuid; - int uid, gid; + uint16 vuid; + uid_t uid; + gid_t gid; int ngroups; - GID_T *groups; + gid_t *groups; }; typedef struct files_struct @@ -509,7 +510,7 @@ typedef struct files_struct SMB_OFF_T pos; SMB_OFF_T size; mode_t mode; - int vuid; + uint16 vuid; char *mmap_ptr; SMB_OFF_T mmap_size; write_bmpx_struct *wbmpx_ptr; @@ -542,8 +543,8 @@ struct dcinfo typedef struct { - int uid; /* uid of a validated user */ - int gid; /* gid of a validated user */ + uid_t uid; /* uid of a validated user */ + gid_t gid; /* gid of a validated user */ fstring requested_name; /* user name from the client */ fstring name; /* unix user name of a validated user */ @@ -553,7 +554,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; + gid_t *groups; int n_sids; int *sids; @@ -714,8 +715,8 @@ struct connect_record int magic; int pid; int cnum; - int uid; - int gid; + uid_t uid; + gid_t gid; char name[24]; char addr[24]; char machine[128]; @@ -727,7 +728,7 @@ struct connection_options { int protocol; /* Connection-Options */ uint32 max_xmit; - uint16 server_uid; + uint16 server_vuid; uint16 tid; /* The following are LANMAN 1.0 options */ uint16 sec_mode; |