mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
Remove "logon_script" from "struct user_struct"
This commit is contained in:
parent
36bfd32f1f
commit
b36fd84186
@ -1781,8 +1781,7 @@ 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 *logon_script;
|
|
||||||
|
|
||||||
bool guest;
|
bool guest;
|
||||||
|
|
||||||
/* following groups stuff added by ih */
|
/* following groups stuff added by ih */
|
||||||
|
@ -3476,17 +3476,14 @@ 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, 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);
|
p2 = skip_string(*rdata,*rdata_len,p2);
|
||||||
if (!p2) {
|
if (!p2) {
|
||||||
return False;
|
return False;
|
||||||
@ -3495,7 +3492,9 @@ static bool api_RNetUserGetInfo(connection_struct *conn, uint16 vuid,
|
|||||||
*p2++ = 0;
|
*p2++ = 0;
|
||||||
SSVAL(p,52,0); /* flags */
|
SSVAL(p,52,0); /* flags */
|
||||||
SIVAL(p,54,PTR_DIFF(p2,*rdata)); /* script_path */
|
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);
|
p2 = skip_string(*rdata,*rdata_len,p2);
|
||||||
if (!p2) {
|
if (!p2) {
|
||||||
return False;
|
return False;
|
||||||
@ -3648,7 +3647,8 @@ static bool api_WWkstaUserLogon(connection_struct *conn,uint16 vuid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
PACKS(&desc,"z",lp_workgroup());/* domain */
|
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 */
|
PACKI(&desc,"D",0x00000000); /* reserved */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,14 +298,6 @@ int register_existing_vuid(uint16 vuid,
|
|||||||
fstrcpy(vuser->user.full_name,
|
fstrcpy(vuser->user.full_name,
|
||||||
pdb_get_fullname(server_info->sam_account));
|
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;
|
vuser->session_key = session_key;
|
||||||
|
|
||||||
DEBUG(10,("register_existing_vuid: (%u,%u) %s %s %s guest=%d\n",
|
DEBUG(10,("register_existing_vuid: (%u,%u) %s %s %s guest=%d\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user