summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-04-29 13:45:58 +0200
committerVolker Lendecke <vl@samba.org>2008-05-05 18:28:59 +0200
commit71ff1ba2deddf8fa12b034518e92e0a461871388 (patch)
treee537137d889203ca1b503c7111b02a57ff3e38ab
parentc6d209f8342d56adc52a6c8ab99a4a2e17d409b2 (diff)
downloadsamba-71ff1ba2deddf8fa12b034518e92e0a461871388.tar.gz
samba-71ff1ba2deddf8fa12b034518e92e0a461871388.tar.bz2
samba-71ff1ba2deddf8fa12b034518e92e0a461871388.zip
Remove "guest" from "struct user_struct"
(This used to be commit 570a6b80feb5b0dc23213ba936c721e766cd4818)
-rw-r--r--source3/include/smb.h2
-rw-r--r--source3/rpc_server/srv_lsa_hnd.c2
-rw-r--r--source3/rpc_server/srv_lsa_nt.c2
-rw-r--r--source3/smbd/lanman.c2
-rw-r--r--source3/smbd/password.c7
-rw-r--r--source3/smbd/service.c6
-rw-r--r--source3/smbd/session.c2
7 files changed, 10 insertions, 13 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index c3f8fbddce..2dba5487dc 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1780,8 +1780,6 @@ typedef struct user_struct {
userdom_struct user;
- bool guest;
-
DATA_BLOB session_key;
char *session_keystr; /* used by utmp and pam session code.
diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c
index a8341e677b..78b891e071 100644
--- a/source3/rpc_server/srv_lsa_hnd.c
+++ b/source3/rpc_server/srv_lsa_hnd.c
@@ -268,7 +268,7 @@ bool pipe_access_check(pipes_struct *p)
return False;
}
- if (user->guest) {
+ if (user->server_info->guest) {
return False;
}
}
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index 20c910e46d..8bc377b97e 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -1468,7 +1468,7 @@ NTSTATUS _lsa_GetUserName(pipes_struct *p,
if (vuser == NULL)
return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
- if (vuser->guest) {
+ if (vuser->server_info->guest) {
/*
* I'm 99% sure this is not the right place to do this,
* global_sid_Anonymous should probably be put into the token
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 7ba4b64477..a3687451d5 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -4572,7 +4572,7 @@ void api_reply(connection_struct *conn, uint16 vuid,
if (api_commands[i].auth_user && lp_restrict_anonymous()) {
user_struct *user = get_valid_user_struct(vuid);
- if (!user || user->guest) {
+ if (!user || user->server_info->guest) {
reply_nterror(req, NT_STATUS_ACCESS_DENIED);
return;
}
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index c5c0245444..6305180e6f 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -269,7 +269,6 @@ int register_existing_vuid(uint16 vuid,
talloc_steal(vuser, vuser->server_info);
- vuser->guest = server_info->guest;
fstrcpy(vuser->user.unix_name, server_info->unix_name);
/* This is a potentially untrusted username */
@@ -286,7 +285,7 @@ int register_existing_vuid(uint16 vuid,
(unsigned int)vuser->server_info->uid,
(unsigned int)vuser->server_info->gid,
vuser->user.unix_name, vuser->user.smb_name,
- vuser->user.domain, vuser->guest ));
+ vuser->user.domain, vuser->server_info->guest ));
DEBUG(3, ("register_existing_vuid: User name: %s\t"
"Real name: %s\n", vuser->user.unix_name,
@@ -320,12 +319,12 @@ int register_existing_vuid(uint16 vuid,
vuser->homes_snum = -1;
- if (!vuser->guest) {
+ if (!vuser->server_info->guest) {
vuser->homes_snum = register_homes_share(
vuser->user.unix_name);
}
- if (srv_is_signing_negotiated() && !vuser->guest &&
+ if (srv_is_signing_negotiated() && !vuser->server_info->guest &&
!srv_signing_started()) {
/* Try and turn on server signing on the first non-guest
* sessionsetup. */
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 43f8699e29..7b0fdc8976 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -714,7 +714,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
TALLOC_FREE(pass);
DEBUG(3,("Guest only user %s\n",user));
} else if (vuser) {
- if (vuser->guest) {
+ if (vuser->server_info->guest) {
if (!lp_guest_ok(snum)) {
DEBUG(2, ("guest user (from session setup) "
"not permitted to access this share "
@@ -740,7 +740,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
conn->gid = vuser->server_info->gid;
string_set(&conn->user,vuser->user.unix_name);
fstrcpy(user,vuser->user.unix_name);
- guest = vuser->guest;
+ guest = vuser->server_info->guest;
} else if (lp_security() == SEC_SHARE) {
NTSTATUS status2;
char *found_username = NULL;
@@ -825,7 +825,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
NTSTATUS status2;
status2 = find_forced_user(conn,
- (vuser != NULL) && vuser->guest,
+ (vuser != NULL) && vuser->server_info->guest,
user);
if (!NT_STATUS_IS_OK(status2)) {
conn_free(conn);
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index adfc4e300f..2b964d828f 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -75,7 +75,7 @@ bool session_claim(user_struct *vuser)
/* don't register sessions for the guest user - its just too
expensive to go through pam session code for browsing etc */
- if (vuser->guest) {
+ if (vuser->server_info->guest) {
return True;
}