From 280e3895b609f7b4fd880dabdc446529938a16f6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 2 Aug 2006 08:53:22 +0000 Subject: r17374: Get rid of a silly "System User" default for "description", also fetch the sambaProfilePath. Volker (This used to be commit 61e7ed593b944fa14330729e585d1f790af93a7b) --- source3/utils/net_rpc_samsync.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'source3/utils') 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) -- cgit