mirror of
https://github.com/samba-team/samba.git
synced 2025-12-21 20:23:50 +03:00
Remove "homedir" from "struct user_struct"
This commit is contained in:
@@ -1781,7 +1781,6 @@ typedef struct user_struct {
|
|||||||
gid_t gid; /* gid of a validated user */
|
gid_t gid; /* gid of a validated user */
|
||||||
|
|
||||||
userdom_struct user;
|
userdom_struct user;
|
||||||
const char *homedir;
|
|
||||||
const char *unix_homedir;
|
const char *unix_homedir;
|
||||||
const char *logon_script;
|
const char *logon_script;
|
||||||
|
|
||||||
|
|||||||
@@ -3420,12 +3420,17 @@ static bool api_RNetUserGetInfo(connection_struct *conn, uint16 vuid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (uLevel == 11) {
|
if (uLevel == 11) {
|
||||||
|
const char *homedir = "";
|
||||||
|
if (vuser != NULL) {
|
||||||
|
homedir = pdb_get_homedir(
|
||||||
|
vuser->server_info->sam_account);
|
||||||
|
}
|
||||||
/* modelled after NTAS 3.51 reply */
|
/* modelled after NTAS 3.51 reply */
|
||||||
SSVAL(p,usri11_priv,conn->admin_user?USER_PRIV_ADMIN:USER_PRIV_USER);
|
SSVAL(p,usri11_priv,conn->admin_user?USER_PRIV_ADMIN:USER_PRIV_USER);
|
||||||
SIVAL(p,usri11_auth_flags,AF_OP_PRINT); /* auth flags */
|
SIVAL(p,usri11_auth_flags,AF_OP_PRINT); /* auth flags */
|
||||||
SIVALS(p,usri11_password_age,-1); /* password age */
|
SIVALS(p,usri11_password_age,-1); /* password age */
|
||||||
SIVAL(p,usri11_homedir,PTR_DIFF(p2,p)); /* home dir */
|
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);
|
p2 = skip_string(*rdata,*rdata_len,p2);
|
||||||
if (!p2) {
|
if (!p2) {
|
||||||
return False;
|
return False;
|
||||||
@@ -3471,12 +3476,17 @@ static bool api_RNetUserGetInfo(connection_struct *conn, uint16 vuid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (uLevel == 1 || uLevel == 2) {
|
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 */
|
memset(p+22,' ',16); /* password */
|
||||||
SIVALS(p,38,-1); /* password age */
|
SIVALS(p,38,-1); /* password age */
|
||||||
SSVAL(p,42,
|
SSVAL(p,42,
|
||||||
conn->admin_user?USER_PRIV_ADMIN:USER_PRIV_USER);
|
conn->admin_user?USER_PRIV_ADMIN:USER_PRIV_USER);
|
||||||
SIVAL(p,44,PTR_DIFF(p2,*rdata)); /* home dir */
|
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);
|
p2 = skip_string(*rdata,*rdata_len,p2);
|
||||||
if (!p2) {
|
if (!p2) {
|
||||||
return False;
|
return False;
|
||||||
|
|||||||
@@ -268,9 +268,6 @@ int register_existing_vuid(uint16 vuid,
|
|||||||
pdb_get_fullname(server_info->sam_account));
|
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 =
|
const char *logon_script =
|
||||||
pdb_get_logon_script(server_info->sam_account);
|
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) {
|
if (logon_script) {
|
||||||
vuser->logon_script = logon_script;
|
vuser->logon_script = logon_script;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user