diff options
author | Jeremy Allison <jra@samba.org> | 2007-10-18 17:40:25 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-10-18 17:40:25 -0700 |
commit | 30191d1a5704ad2b158386b511558972d539ce47 (patch) | |
tree | 4f46e5c4f28f672ab661aa18f45745860970a88c /source3/smbd/uid.c | |
parent | 789856f63ff73fec66298e95c91c60db7bdaf14e (diff) | |
download | samba-30191d1a5704ad2b158386b511558972d539ce47.tar.gz samba-30191d1a5704ad2b158386b511558972d539ce47.tar.bz2 samba-30191d1a5704ad2b158386b511558972d539ce47.zip |
RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
Diffstat (limited to 'source3/smbd/uid.c')
-rw-r--r-- | source3/smbd/uid.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index d1837c41dc..dceea450e6 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -49,7 +49,7 @@ gid_t get_current_user_gid_next(int *piterator) Become the guest user without changing the security context stack. ****************************************************************************/ -BOOL change_to_guest(void) +bool change_to_guest(void) { static struct passwd *pass=NULL; @@ -81,11 +81,11 @@ BOOL change_to_guest(void) Check if a username is OK. ********************************************************************/ -static BOOL check_user_ok(connection_struct *conn, user_struct *vuser,int snum) +static bool check_user_ok(connection_struct *conn, user_struct *vuser,int snum) { unsigned int i; struct vuid_cache_entry *ent = NULL; - BOOL readonly_share; + bool readonly_share; NT_USER_TOKEN *token; for (i=0;i<conn->vuid_cache.entries && i< VUID_CACHE_SIZE;i++) { @@ -146,14 +146,14 @@ static BOOL check_user_ok(connection_struct *conn, user_struct *vuser,int snum) stack, but modify the current_user entries. ****************************************************************************/ -BOOL change_to_user(connection_struct *conn, uint16 vuid) +bool change_to_user(connection_struct *conn, uint16 vuid) { user_struct *vuser = get_valid_user_struct(vuid); int snum; gid_t gid; uid_t uid; char group_c; - BOOL must_free_token = False; + bool must_free_token = False; NT_USER_TOKEN *token = NULL; int num_groups = 0; gid_t *group_list = NULL; @@ -279,7 +279,7 @@ BOOL change_to_user(connection_struct *conn, uint16 vuid) but modify the current_user entries. ****************************************************************************/ -BOOL change_to_root_user(void) +bool change_to_root_user(void) { set_root_sec_ctx(); @@ -298,7 +298,7 @@ BOOL change_to_root_user(void) user. Doesn't modify current_user. ****************************************************************************/ -BOOL become_authenticated_pipe_user(pipes_struct *p) +bool become_authenticated_pipe_user(pipes_struct *p) { if (!push_sec_ctx()) return False; @@ -317,7 +317,7 @@ BOOL become_authenticated_pipe_user(pipes_struct *p) current_user. ****************************************************************************/ -BOOL unbecome_authenticated_pipe_user(void) +bool unbecome_authenticated_pipe_user(void) { return pop_sec_ctx(); } @@ -405,7 +405,7 @@ void unbecome_root(void) Saves and restores the connection context. ****************************************************************************/ -BOOL become_user(connection_struct *conn, uint16 vuid) +bool become_user(connection_struct *conn, uint16 vuid) { if (!push_sec_ctx()) return False; @@ -421,7 +421,7 @@ BOOL become_user(connection_struct *conn, uint16 vuid) return True; } -BOOL unbecome_user(void) +bool unbecome_user(void) { pop_sec_ctx(); pop_conn_ctx(); |