diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-06-05 16:19:01 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-06-06 10:18:41 +0200 |
commit | d3e79a864d0eaf962ed00794e7424441e80294c1 (patch) | |
tree | 08f33bbfb3906aeec4fe270d77f88c2493378934 /source3/smbd | |
parent | c535668f7b203be96f002d88840338486a80f802 (diff) | |
download | samba-d3e79a864d0eaf962ed00794e7424441e80294c1.tar.gz samba-d3e79a864d0eaf962ed00794e7424441e80294c1.tar.bz2 samba-d3e79a864d0eaf962ed00794e7424441e80294c1.zip |
s3:smbd: change vuid to uint64_t in uid.c
metze
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/proto.h | 6 | ||||
-rw-r--r-- | source3/smbd/uid.c | 22 |
2 files changed, 14 insertions, 14 deletions
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 664ac46bc9..e73e5b5710 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -1097,7 +1097,7 @@ void reply_transs2(struct smb_request *req); /* The following definitions come from smbd/uid.c */ bool change_to_guest(void); -bool change_to_user(connection_struct *conn, uint16 vuid); +bool change_to_user(connection_struct *conn, uint64_t vuid); bool change_to_root_user(void); bool smbd_change_to_root_user(void); bool become_authenticated_pipe_user(struct auth_session_info *session_info); @@ -1106,7 +1106,7 @@ void become_root(void); void unbecome_root(void); void smbd_become_root(void); void smbd_unbecome_root(void); -bool become_user(connection_struct *conn, uint16 vuid); +bool become_user(connection_struct *conn, uint64_t vuid); bool become_user_by_session(connection_struct *conn, const struct auth_session_info *session_info); bool unbecome_user(void); @@ -1114,7 +1114,7 @@ uid_t get_current_uid(connection_struct *conn); gid_t get_current_gid(connection_struct *conn); const struct security_unix_token *get_current_utok(connection_struct *conn); const struct security_token *get_current_nttok(connection_struct *conn); -uint16_t get_current_vuid(connection_struct *conn); +uint64_t get_current_vuid(connection_struct *conn); /* The following definitions come from smbd/utmp.c */ diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index f4ad78eeea..27d7d1a413 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -86,7 +86,7 @@ static void free_conn_session_info_if_unused(connection_struct *conn) ********************************************************************/ static bool check_user_ok(connection_struct *conn, - uint16_t vuid, + uint64_t vuid, const struct auth_session_info *session_info, int snum) { @@ -191,7 +191,7 @@ static bool check_user_ok(connection_struct *conn, static bool change_to_user_internal(connection_struct *conn, const struct auth_session_info *session_info, - uint16_t vuid) + uint64_t vuid) { int snum; gid_t gid; @@ -275,7 +275,7 @@ static bool change_to_user_internal(connection_struct *conn, return true; } -bool change_to_user(connection_struct *conn, uint16_t vuid) +bool change_to_user(connection_struct *conn, uint64_t vuid) { const struct auth_session_info *session_info = NULL; struct user_struct *vuser; @@ -298,16 +298,16 @@ bool change_to_user(connection_struct *conn, uint16_t vuid) if (vuser == NULL) { /* Invalid vuid sent */ - DEBUG(2,("Invalid vuid %d used on " - "share %s.\n", vuid, lp_servicename(snum) )); + DEBUG(2,("Invalid vuid %llu used on share %s.\n", + (unsigned long long)vuid, lp_servicename(snum))); return false; } session_info = vuser->session_info; if (!conn->force_user && vuser == NULL) { - DEBUG(2,("Invalid vuid used %d in accessing " - "share %s.\n", vuid, lp_servicename(snum) )); + DEBUG(2,("Invalid vuid used %llu in accessing share %s.\n", + (unsigned long long)vuid, lp_servicename(snum))); return False; } @@ -399,8 +399,8 @@ static void push_conn_ctx(void) ctx_p->conn = current_user.conn; ctx_p->vuid = current_user.vuid; - DEBUG(4, ("push_conn_ctx(%u) : conn_ctx_stack_ndx = %d\n", - (unsigned int)ctx_p->vuid, conn_ctx_stack_ndx )); + DEBUG(4, ("push_conn_ctx(%llu) : conn_ctx_stack_ndx = %d\n", + (unsigned long long)ctx_p->vuid, conn_ctx_stack_ndx)); conn_ctx_stack_ndx++; } @@ -457,7 +457,7 @@ void smbd_unbecome_root(void) Saves and restores the connection context. ****************************************************************************/ -bool become_user(connection_struct *conn, uint16 vuid) +bool become_user(connection_struct *conn, uint64_t vuid) { if (!push_sec_ctx()) return False; @@ -535,7 +535,7 @@ const struct security_token *get_current_nttok(connection_struct *conn) return current_user.nt_user_token; } -uint16_t get_current_vuid(connection_struct *conn) +uint64_t get_current_vuid(connection_struct *conn) { return current_user.vuid; } |