summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-03-12 13:56:51 -0800
committerJeremy Allison <jra@samba.org>2010-03-12 13:56:51 -0800
commite80ceb1d7355c8c46a2ed90d5721cf367640f4e8 (patch)
treea1172af1868d93449ac25d68576193a872e0bb50 /source3/include
parent31b0417f7def5af5392088eec8fe6e77074d3da9 (diff)
downloadsamba-e80ceb1d7355c8c46a2ed90d5721cf367640f4e8.tar.gz
samba-e80ceb1d7355c8c46a2ed90d5721cf367640f4e8.tar.bz2
samba-e80ceb1d7355c8c46a2ed90d5721cf367640f4e8.zip
Remove more uses of "extern struct current_user current_user;".
Use accessor functions to get to this value. Tidies up much of the user context code. Volker, please look at the changes in smbd/uid.c to familiarize yourself with these changes as I think they make the logic in there cleaner. Cause smbd/posix_acls.c code to look at current user context, not stored context on the conn struct - allows correct use of these function calls under a become_root()/unbecome_root() pair. Jeremy.
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index f6a43852f0..5b4304d27d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6752,7 +6752,7 @@ uint32_t map_canon_ace_perms(int snum,
enum security_ace_type *pacl_type,
mode_t perms,
bool directory_ace);
-NTSTATUS unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp, uint32 security_info_sent, const SEC_DESC *psd);
+NTSTATUS unpack_nt_owners(connection_struct *conn, uid_t *puser, gid_t *pgrp, uint32 security_info_sent, const SEC_DESC *psd);
SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T the_acl);
NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
SEC_DESC **ppdesc);
@@ -7116,6 +7116,11 @@ void become_root(void);
void unbecome_root(void);
bool become_user(connection_struct *conn, uint16 vuid);
bool unbecome_user(void);
+uid_t get_current_uid(connection_struct *conn);
+gid_t get_current_gid(connection_struct *conn);
+const UNIX_USER_TOKEN *get_current_utok(connection_struct *conn);
+const NT_USER_TOKEN *get_current_nttok(connection_struct *conn);
+uint16_t get_current_vuid(connection_struct *conn);
/* The following definitions come from smbd/utmp.c */