summaryrefslogtreecommitdiff
path: root/source3/smbd/lanman.c
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 /source3/smbd/lanman.c
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)
Diffstat (limited to 'source3/smbd/lanman.c')
-rw-r--r--source3/smbd/lanman.c14
1 files changed, 12 insertions, 2 deletions
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;