diff options
author | Volker Lendecke <vl@samba.org> | 2008-04-29 13:28:40 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-05-05 18:28:58 +0200 |
commit | faa5e8e12c58376db0323a4e4855454ed53dcc00 (patch) | |
tree | 780d720eb4523780e00ce660ee1a62052ea3a0c3 | |
parent | 2b3d03d6f16e4110d0000cbb10a087cef2ce9e44 (diff) | |
download | samba-faa5e8e12c58376db0323a4e4855454ed53dcc00.tar.gz samba-faa5e8e12c58376db0323a4e4855454ed53dcc00.tar.bz2 samba-faa5e8e12c58376db0323a4e4855454ed53dcc00.zip |
Remove "logon_script" from "struct user_struct"
(This used to be commit b36fd84186a656f86e4cfb9166fc0ecbffb422cb)
-rw-r--r-- | source3/include/smb.h | 3 | ||||
-rw-r--r-- | source3/smbd/lanman.c | 16 | ||||
-rw-r--r-- | source3/smbd/password.c | 8 |
3 files changed, 9 insertions, 18 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index 2ec432929d..7a228d0d03 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1781,8 +1781,7 @@ typedef struct user_struct { gid_t gid; /* gid of a validated user */ userdom_struct user; - const char *logon_script; - + bool guest; /* following groups stuff added by ih */ diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index be8aa58e7f..39d49334e0 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -3476,17 +3476,14 @@ static bool api_RNetUserGetInfo(connection_struct *conn, uint16 vuid, } if (uLevel == 1 || uLevel == 2) { - const char *homedir = ""; - if (vuser != NULL) { - homedir = pdb_get_homedir( - vuser->server_info->sam_account); - } memset(p+22,' ',16); /* password */ SIVALS(p,38,-1); /* password age */ SSVAL(p,42, conn->admin_user?USER_PRIV_ADMIN:USER_PRIV_USER); SIVAL(p,44,PTR_DIFF(p2,*rdata)); /* home dir */ - strlcpy(p2, homedir, PTR_DIFF(endp,p2)); + strlcpy(p2, vuser ? pdb_get_homedir( + vuser->server_info->sam_account) : "", + PTR_DIFF(endp,p2)); p2 = skip_string(*rdata,*rdata_len,p2); if (!p2) { return False; @@ -3495,7 +3492,9 @@ static bool api_RNetUserGetInfo(connection_struct *conn, uint16 vuid, *p2++ = 0; SSVAL(p,52,0); /* flags */ SIVAL(p,54,PTR_DIFF(p2,*rdata)); /* script_path */ - strlcpy(p2,vuser && vuser->logon_script ? vuser->logon_script : "",PTR_DIFF(endp,p2)); + strlcpy(p2, vuser ? pdb_get_logon_script( + vuser->server_info->sam_account) : "", + PTR_DIFF(endp,p2)); p2 = skip_string(*rdata,*rdata_len,p2); if (!p2) { return False; @@ -3648,7 +3647,8 @@ static bool api_WWkstaUserLogon(connection_struct *conn,uint16 vuid, } PACKS(&desc,"z",lp_workgroup());/* domain */ - PACKS(&desc,"z", vuser && vuser->logon_script ? vuser->logon_script :""); /* script path */ + PACKS(&desc,"z", vuser ? pdb_get_logon_script( + vuser->server_info->sam_account) : ""); /* script path */ PACKI(&desc,"D",0x00000000); /* reserved */ } diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 74fa645c13..124bc315fa 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -298,14 +298,6 @@ int register_existing_vuid(uint16 vuid, fstrcpy(vuser->user.full_name, pdb_get_fullname(server_info->sam_account)); - { - const char *logon_script = - pdb_get_logon_script(server_info->sam_account); - - if (logon_script) { - vuser->logon_script = logon_script; - } - } vuser->session_key = session_key; DEBUG(10,("register_existing_vuid: (%u,%u) %s %s %s guest=%d\n", |