summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_rpc_samsync.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index 298a7c7c43..4f7209cdb5 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -1534,7 +1534,7 @@ static NTSTATUS fetch_account_info_to_ldif(SAM_DELTA_CTR *delta,
{
fstring username, logonscript, homedrive, homepath = "", homedir = "";
fstring hex_nt_passwd, hex_lm_passwd;
- fstring description, fullname, sambaSID;
+ fstring description, profilepath, fullname, sambaSID;
uchar lm_passwd[16], nt_passwd[16];
char *flags, *user_rdn;
const char *ou;
@@ -1586,14 +1586,15 @@ static NTSTATUS fetch_account_info_to_ldif(SAM_DELTA_CTR *delta,
/* Get the description */
unistr2_to_ascii(description, &(delta->account_info.uni_acct_desc),
sizeof(description)-1);
- if (!*description) {
- pstr_sprintf(description, "System User");
- }
/* Get the display name */
unistr2_to_ascii(fullname, &(delta->account_info.uni_full_name),
sizeof(fullname)-1);
+ /* Get the profile path */
+ unistr2_to_ascii(profilepath, &(delta->account_info.uni_profile),
+ sizeof(profilepath)-1);
+
/* Get lm and nt password data */
if (memcmp(delta->account_info.pass.buf_lm_pwd, zero_buf, 16) != 0) {
sam_pwd_hash(delta->account_info.user_rid,
@@ -1668,11 +1669,14 @@ static NTSTATUS fetch_account_info_to_ldif(SAM_DELTA_CTR *delta,
((delta->account_info.acb_info & ACB_NORMAL) ?
"/bin/bash" : "/bin/false"));
fprintf(add_fd, "gecos: System User\n");
- fprintf_attr(add_fd, "description", "%s", description);
+ if (*description)
+ fprintf_attr(add_fd, "description", "%s", description);
fprintf(add_fd, "sambaSID: %s-%d\n", sid, rid);
fprintf(add_fd, "sambaPrimaryGroupSID: %s\n", sambaSID);
if(*fullname)
fprintf_attr(add_fd, "displayName", "%s", fullname);
+ if(*profilepath)
+ fprintf_attr(add_fd, "sambaProfilePath", "%s", profilepath);
if (strcmp(nopasswd, hex_lm_passwd) != 0)
fprintf(add_fd, "sambaLMPassword: %s\n", hex_lm_passwd);
if (strcmp(nopasswd, hex_nt_passwd) != 0)