summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-04-29 12:47:55 +0200
committerVolker Lendecke <vl@samba.org>2008-05-05 18:28:58 +0200
commit1b2bf00fb98417434f653ce869226887d97aaeb2 (patch)
treebbc6cb2fc2516f22ca29acec184b4d3df3901ca0
parent6ccbc1065de45cb776a4aadd11bf64c73419de7c (diff)
downloadsamba-1b2bf00fb98417434f653ce869226887d97aaeb2.tar.gz
samba-1b2bf00fb98417434f653ce869226887d97aaeb2.tar.bz2
samba-1b2bf00fb98417434f653ce869226887d97aaeb2.zip
Remove "homedir" from "struct user_struct"
(This used to be commit 41f9afd62d8cc6067582d452f3d53a5c67253b69)
-rw-r--r--source3/include/smb.h1
-rw-r--r--source3/smbd/lanman.c14
-rw-r--r--source3/smbd/password.c6
3 files changed, 12 insertions, 9 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index f3295e12bd..cb36b9bebb 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1781,7 +1781,6 @@ typedef struct user_struct {
gid_t gid; /* gid of a validated user */
userdom_struct user;
- const char *homedir;
const char *unix_homedir;
const char *logon_script;
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 6fa4f9698d..be8aa58e7f 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -3420,12 +3420,17 @@ static bool api_RNetUserGetInfo(connection_struct *conn, uint16 vuid,
}
if (uLevel == 11) {
+ const char *homedir = "";
+ if (vuser != NULL) {
+ homedir = pdb_get_homedir(
+ vuser->server_info->sam_account);
+ }
/* modelled after NTAS 3.51 reply */
SSVAL(p,usri11_priv,conn->admin_user?USER_PRIV_ADMIN:USER_PRIV_USER);
SIVAL(p,usri11_auth_flags,AF_OP_PRINT); /* auth flags */
SIVALS(p,usri11_password_age,-1); /* password age */
SIVAL(p,usri11_homedir,PTR_DIFF(p2,p)); /* home dir */
- strlcpy(p2, vuser && vuser->homedir ? vuser->homedir : "",PTR_DIFF(endp,p2));
+ strlcpy(p2, homedir, PTR_DIFF(endp,p2));
p2 = skip_string(*rdata,*rdata_len,p2);
if (!p2) {
return False;
@@ -3471,12 +3476,17 @@ 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, vuser && vuser->homedir ? vuser->homedir : "",PTR_DIFF(endp,p2));
+ strlcpy(p2, homedir, PTR_DIFF(endp,p2));
p2 = skip_string(*rdata,*rdata_len,p2);
if (!p2) {
return False;
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 80eba562c5..a7e462a0ca 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -268,9 +268,6 @@ int register_existing_vuid(uint16 vuid,
pdb_get_fullname(server_info->sam_account));
{
- /* Keep the homedir handy */
- const char *homedir =
- pdb_get_homedir(server_info->sam_account);
const char *logon_script =
pdb_get_logon_script(server_info->sam_account);
@@ -294,9 +291,6 @@ int register_existing_vuid(uint16 vuid,
}
}
- if (homedir) {
- vuser->homedir = homedir;
- }
if (logon_script) {
vuser->logon_script = logon_script;
}