summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-06-05 12:04:15 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-06 10:18:39 +0200
commitf52e5738a26e12787ec8a4c8d73ff14122d202c6 (patch)
tree61a860936d78b0d89b30af1ac0c32005f7ea9518 /source3/smbd
parent9e2e3708aa4e10aef561b1a9cc1f89688d65445f (diff)
downloadsamba-f52e5738a26e12787ec8a4c8d73ff14122d202c6.tar.gz
samba-f52e5738a26e12787ec8a4c8d73ff14122d202c6.tar.bz2
samba-f52e5738a26e12787ec8a4c8d73ff14122d202c6.zip
s3:smbd: use 'struct user_struct' instead of typedef'ed 'user_struct'
metze
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/globals.h2
-rw-r--r--source3/smbd/lanman.c4
-rw-r--r--source3/smbd/password.c16
-rw-r--r--source3/smbd/process.c2
-rw-r--r--source3/smbd/proto.h10
-rw-r--r--source3/smbd/reply.c2
-rw-r--r--source3/smbd/service.c8
-rw-r--r--source3/smbd/session.c4
-rw-r--r--source3/smbd/sesssetup.c2
-rw-r--r--source3/smbd/smb2_sesssetup.c2
-rw-r--r--source3/smbd/smb2_tcon.c2
-rw-r--r--source3/smbd/uid.c2
12 files changed, 28 insertions, 28 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 2c0056660f..f692eae488 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -449,7 +449,7 @@ struct smbd_smb2_session {
DATA_BLOB session_key;
bool do_signing;
- user_struct *compat_vuser;
+ struct user_struct *compat_vuser;
struct {
/* an id tree used to allocate tids */
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index ac2faa9f5d..a2e08c7b1b 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -4627,7 +4627,7 @@ static bool api_WWkstaUserLogon(struct smbd_server_connection *sconn,
char* name;
/* With share level security vuid will always be zero.
Don't depend on vuser being non-null !!. JRA */
- user_struct *vuser = get_valid_user_struct(sconn, vuid);
+ struct user_struct *vuser = get_valid_user_struct(sconn, vuid);
if (!str1 || !str2 || !p) {
return False;
@@ -5855,7 +5855,7 @@ void api_reply(connection_struct *conn, uint16 vuid,
/* Check whether this api call can be done anonymously */
if (api_commands[i].auth_user && lp_restrict_anonymous()) {
- user_struct *user = get_valid_user_struct(req->sconn, vuid);
+ struct user_struct *user = get_valid_user_struct(req->sconn, vuid);
if (!user || security_session_user_level(user->session_info, NULL) < SECURITY_USER) {
reply_nterror(req, NT_STATUS_ACCESS_DENIED);
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 2a76d830b5..c1561f1884 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -41,12 +41,12 @@ enum server_allocated_state { SERVER_ALLOCATED_REQUIRED_YES,
SERVER_ALLOCATED_REQUIRED_NO,
SERVER_ALLOCATED_REQUIRED_ANY};
-static user_struct *get_valid_user_struct_internal(
+static struct user_struct *get_valid_user_struct_internal(
struct smbd_server_connection *sconn,
uint16 vuid,
enum server_allocated_state server_allocated)
{
- user_struct *usp;
+ struct user_struct *usp;
int count=0;
if (vuid == UID_FIELD_INVALID)
@@ -84,7 +84,7 @@ static user_struct *get_valid_user_struct_internal(
tell random client vuid's (normally zero) from valid vuids.
****************************************************************************/
-user_struct *get_valid_user_struct(struct smbd_server_connection *sconn,
+struct user_struct *get_valid_user_struct(struct smbd_server_connection *sconn,
uint16 vuid)
{
return get_valid_user_struct_internal(sconn, vuid,
@@ -100,7 +100,7 @@ bool is_partial_auth_vuid(struct smbd_server_connection *sconn, uint16 vuid)
Get the user struct of a partial NTLMSSP login
****************************************************************************/
-user_struct *get_partial_auth_user_struct(struct smbd_server_connection *sconn,
+struct user_struct *get_partial_auth_user_struct(struct smbd_server_connection *sconn,
uint16 vuid)
{
return get_valid_user_struct_internal(sconn, vuid,
@@ -113,7 +113,7 @@ user_struct *get_partial_auth_user_struct(struct smbd_server_connection *sconn,
void invalidate_vuid(struct smbd_server_connection *sconn, uint16 vuid)
{
- user_struct *vuser = NULL;
+ struct user_struct *vuser = NULL;
vuser = get_valid_user_struct_internal(sconn, vuid,
SERVER_ALLOCATED_REQUIRED_ANY);
@@ -169,14 +169,14 @@ static void increment_next_vuid(uint16_t *vuid)
int register_initial_vuid(struct smbd_server_connection *sconn)
{
- user_struct *vuser;
+ struct user_struct *vuser;
/* Limit allowed vuids to 16bits - VUID_OFFSET. */
if (sconn->num_users >= 0xFFFF-VUID_OFFSET) {
return UID_FIELD_INVALID;
}
- if((vuser = talloc_zero(NULL, user_struct)) == NULL) {
+ if((vuser = talloc_zero(NULL, struct user_struct)) == NULL) {
DEBUG(0,("register_initial_vuid: "
"Failed to talloc users struct!\n"));
return UID_FIELD_INVALID;
@@ -261,7 +261,7 @@ int register_existing_vuid(struct smbd_server_connection *sconn,
struct auth_session_info *session_info,
DATA_BLOB response_blob)
{
- user_struct *vuser;
+ struct user_struct *vuser;
bool guest = security_session_user_level(session_info, NULL) < SECURITY_USER;
vuser = get_partial_auth_user_struct(sconn, vuid);
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 2d38e049a9..496622c9b4 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1391,7 +1391,7 @@ static connection_struct *switch_message(uint8 type, struct smb_request *req)
*/
if (session_tag != sconn->smb1.sessions.last_session_tag) {
- user_struct *vuser = NULL;
+ struct user_struct *vuser = NULL;
sconn->smb1.sessions.last_session_tag = session_tag;
if(session_tag != UID_FIELD_INVALID) {
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index b5a2ddf35f..a3d2ab0687 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -687,10 +687,10 @@ struct kernel_oplocks *linux_init_kernel_oplocks(struct smbd_server_connection *
/* The following definitions come from smbd/password.c */
-user_struct *get_valid_user_struct(struct smbd_server_connection *sconn,
+struct user_struct *get_valid_user_struct(struct smbd_server_connection *sconn,
uint16 vuid);
bool is_partial_auth_vuid(struct smbd_server_connection *sconn, uint16 vuid);
-user_struct *get_partial_auth_user_struct(struct smbd_server_connection *sconn,
+struct user_struct *get_partial_auth_user_struct(struct smbd_server_connection *sconn,
uint16 vuid);
void invalidate_vuid(struct smbd_server_connection *sconn, uint16 vuid);
void invalidate_all_vuids(struct smbd_server_connection *sconn);
@@ -984,7 +984,7 @@ int find_service(TALLOC_CTX *ctx, const char *service, char **p_service_out);
struct smbd_smb2_tcon;
connection_struct *make_connection_smb2(struct smbd_server_connection *sconn,
struct smbd_smb2_tcon *tcon,
- user_struct *vuser,
+ struct user_struct *vuser,
const char *pdev,
NTSTATUS *pstatus);
connection_struct *make_connection(struct smbd_server_connection *sconn,
@@ -996,8 +996,8 @@ void close_cnum(connection_struct *conn, uint16 vuid);
/* The following definitions come from smbd/session.c */
struct sessionid;
bool session_init(void);
-bool session_claim(struct smbd_server_connection *sconn, user_struct *vuser);
-void session_yield(user_struct *vuser);
+bool session_claim(struct smbd_server_connection *sconn, struct user_struct *vuser);
+void session_yield(struct user_struct *vuser);
int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list);
/* The following definitions come from smbd/sesssetup.c */
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index f1a97697f6..f89631707b 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2073,7 +2073,7 @@ void reply_open_and_X(struct smb_request *req)
void reply_ulogoffX(struct smb_request *req)
{
struct smbd_server_connection *sconn = req->sconn;
- user_struct *vuser;
+ struct user_struct *vuser;
START_PROFILE(SMBulogoffX);
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index d0fd215dc7..517d96127d 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -536,7 +536,7 @@ static void create_share_access_mask(connection_struct *conn, int snum)
static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn,
connection_struct *conn,
- int snum, user_struct *vuser,
+ int snum, struct user_struct *vuser,
const char *pdev)
{
struct smb_filename *smb_fname_cpath = NULL;
@@ -913,7 +913,7 @@ static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn,
****************************************************************************/
static connection_struct *make_connection_smb1(struct smbd_server_connection *sconn,
- int snum, user_struct *vuser,
+ int snum, struct user_struct *vuser,
const char *pdev,
NTSTATUS *pstatus)
{
@@ -942,7 +942,7 @@ static connection_struct *make_connection_smb1(struct smbd_server_connection *sc
connection_struct *make_connection_smb2(struct smbd_server_connection *sconn,
struct smbd_smb2_tcon *tcon,
- user_struct *vuser,
+ struct user_struct *vuser,
const char *pdev,
NTSTATUS *pstatus)
{
@@ -977,7 +977,7 @@ connection_struct *make_connection(struct smbd_server_connection *sconn,
NTSTATUS *status)
{
uid_t euid;
- user_struct *vuser = NULL;
+ struct user_struct *vuser = NULL;
char *service = NULL;
fstring dev;
int snum = -1;
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index e03af1e030..a98ef51016 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -40,7 +40,7 @@
called when a session is created
********************************************************************/
-bool session_claim(struct smbd_server_connection *sconn, user_struct *vuser)
+bool session_claim(struct smbd_server_connection *sconn, struct user_struct *vuser)
{
struct server_id pid = messaging_server_id(sconn->msg_ctx);
TDB_DATA data;
@@ -194,7 +194,7 @@ bool session_claim(struct smbd_server_connection *sconn, user_struct *vuser)
called when a session is destroyed
********************************************************************/
-void session_yield(user_struct *vuser)
+void session_yield(struct user_struct *vuser)
{
struct sessionid sessionid;
struct db_record *rec;
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index c0d44500f3..a3c6ede818 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -127,7 +127,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
uint16 data_blob_len = SVAL(req->vwv+7, 0);
enum remote_arch_types ra_type = get_remote_arch();
int vuid = req->vuid;
- user_struct *vuser = NULL;
+ struct user_struct *vuser = NULL;
NTSTATUS status = NT_STATUS_OK;
struct smbd_server_connection *sconn = req->sconn;
uint16_t action = 0;
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index 939cfaced1..caf009aedc 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -224,7 +224,7 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbd_smb2_session *session,
session->session_key = session->session_info->session_key;
- session->compat_vuser = talloc_zero(session, user_struct);
+ session->compat_vuser = talloc_zero(session, struct user_struct);
if (session->compat_vuser == NULL) {
TALLOC_FREE(session);
return NT_STATUS_NO_MEMORY;
diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c
index de4faca7ff..14294aefaf 100644
--- a/source3/smbd/smb2_tcon.c
+++ b/source3/smbd/smb2_tcon.c
@@ -203,7 +203,7 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
int snum = -1;
struct smbd_smb2_tcon *tcon;
connection_struct *compat_conn = NULL;
- user_struct *compat_vuser = req->session->compat_vuser;
+ struct user_struct *compat_vuser = req->session->compat_vuser;
int id;
NTSTATUS status;
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index abafd36912..f4ad78eeea 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -278,7 +278,7 @@ static bool change_to_user_internal(connection_struct *conn,
bool change_to_user(connection_struct *conn, uint16_t vuid)
{
const struct auth_session_info *session_info = NULL;
- user_struct *vuser;
+ struct user_struct *vuser;
int snum = SNUM(conn);
if (!conn) {