summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-12-15 22:47:30 +0100
committerVolker Lendecke <vl@samba.org>2007-12-15 22:47:30 +0100
commit2e07c2ade89f4ff281c61f74cb88e09990cf5f46 (patch)
treea1fb43117e5b3966c8113d47c37a1bdf1e8ee30b /source3/utils
parent79cd97cc3f496f781d809c1ab619afa2cc07293d (diff)
downloadsamba-2e07c2ade89f4ff281c61f74cb88e09990cf5f46.tar.gz
samba-2e07c2ade89f4ff281c61f74cb88e09990cf5f46.tar.bz2
samba-2e07c2ade89f4ff281c61f74cb88e09990cf5f46.zip
s/sid_to_string/sid_to_fstring/
least surprise for callers (This used to be commit eb523ba77697346a365589101aac379febecd546)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net.c6
-rw-r--r--source3/utils/net_groupmap.c2
-rw-r--r--source3/utils/net_rpc.c12
-rw-r--r--source3/utils/net_rpc_rights.c4
-rw-r--r--source3/utils/net_rpc_samsync.c23
-rw-r--r--source3/utils/net_usershare.c3
-rw-r--r--source3/utils/smbcacls.c2
-rw-r--r--source3/utils/smbcquotas.c2
8 files changed, 29 insertions, 25 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index 8118ec4512..bf70d08d8b 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -665,7 +665,7 @@ static int net_getlocalsid(int argc, const char **argv)
DEBUG(0, ("Can't fetch domain SID for name: %s\n", name));
return 1;
}
- sid_to_string(sid_str, &sid);
+ sid_to_fstring(sid_str, &sid);
d_printf("SID for domain %s is: %s\n", name, sid_str);
return 0;
}
@@ -743,7 +743,7 @@ static int net_getdomainsid(int argc, const char **argv)
d_fprintf(stderr, "Could not fetch local SID\n");
return 1;
}
- sid_to_string(sid_str, &domain_sid);
+ sid_to_fstring(sid_str, &domain_sid);
d_printf("SID for local machine %s is: %s\n", global_myname(), sid_str);
if (!secrets_fetch_domain_sid(opt_workgroup, &domain_sid)) {
@@ -751,7 +751,7 @@ static int net_getdomainsid(int argc, const char **argv)
return 1;
}
- sid_to_string(sid_str, &domain_sid);
+ sid_to_fstring(sid_str, &domain_sid);
d_printf("SID for domain %s is: %s\n", opt_workgroup, sid_str);
return 0;
diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c
index c59548b2f1..b0e3d60a24 100644
--- a/source3/utils/net_groupmap.c
+++ b/source3/utils/net_groupmap.c
@@ -270,7 +270,7 @@ static int net_groupmap_add(int argc, const char **argv)
if ( !string_sid[0] ) {
sid_copy(&sid, get_global_sam_sid());
sid_append_rid(&sid, rid);
- sid_to_string(string_sid, &sid);
+ sid_to_fstring(string_sid, &sid);
}
if (!ntcomment[0]) {
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 2e085d6c0a..ab0cc73e49 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -442,7 +442,7 @@ NTSTATUS rpc_info_internals(const DOM_SID *domain_sid,
SAM_UNK_CTR ctr;
fstring sid_str;
- sid_to_string(sid_str, domain_sid);
+ sid_to_fstring(sid_str, domain_sid);
/* Get sam policy handle */
result = rpccli_samr_connect(pipe_hnd, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
@@ -519,7 +519,7 @@ static NTSTATUS rpc_getsid_internals(const DOM_SID *domain_sid,
{
fstring sid_str;
- sid_to_string(sid_str, domain_sid);
+ sid_to_fstring(sid_str, domain_sid);
d_printf("Storing SID %s for Domain %s in secrets.tdb\n",
sid_str, domain_name);
@@ -2661,7 +2661,7 @@ static NTSTATUS rpc_list_group_members(struct rpc_pipe_client *pipe_hnd,
int i;
fstring sid_str;
- sid_to_string(sid_str, domain_sid);
+ sid_to_fstring(sid_str, domain_sid);
result = rpccli_samr_open_group(pipe_hnd, mem_ctx, domain_pol,
MAXIMUM_ALLOWED_ACCESS,
@@ -2773,7 +2773,7 @@ static NTSTATUS rpc_list_alias_members(struct rpc_pipe_client *pipe_hnd,
for (i = 0; i < num_members; i++) {
fstring sid_str;
- sid_to_string(sid_str, &alias_sids[i]);
+ sid_to_fstring(sid_str, &alias_sids[i]);
if (opt_long_list_entries) {
printf("%s %s\\%s %d\n", sid_str,
@@ -5818,7 +5818,7 @@ static NTSTATUS rpc_query_domain_sid(const DOM_SID *domain_sid,
const char **argv)
{
fstring str_sid;
- sid_to_string(str_sid, domain_sid);
+ sid_to_fstring(str_sid, domain_sid);
d_printf("%s\n", str_sid);
return NT_STATUS_OK;
}
@@ -5829,7 +5829,7 @@ static void print_trusted_domain(DOM_SID *dom_sid, const char *trusted_dom_name)
int pad_len, col_len = 20;
/* convert sid into ascii string */
- sid_to_string(ascii_sid, dom_sid);
+ sid_to_fstring(ascii_sid, dom_sid);
/* calculate padding space for d_printf to look nicer */
pad_len = col_len - strlen(trusted_dom_name);
diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c
index 2375bc9fcf..23be8859e0 100644
--- a/source3/utils/net_rpc_rights.c
+++ b/source3/utils/net_rpc_rights.c
@@ -231,7 +231,7 @@ static NTSTATUS enum_accounts_for_privilege(struct rpc_pipe_client *pipe_hnd,
printing the raw SID if necessary */
result = sid_to_name( pipe_hnd, ctx, &sids[i], name );
if ( !NT_STATUS_IS_OK (result) )
- sid_to_string(name, &sids[i]);
+ sid_to_fstring(name, &sids[i]);
d_printf(" %s\n", name);
}
@@ -267,7 +267,7 @@ static NTSTATUS enum_privileges_for_accounts(struct rpc_pipe_client *pipe_hnd,
result = sid_to_name(pipe_hnd, ctx, &sids[i], name );
if ( !NT_STATUS_IS_OK (result) )
- sid_to_string(name, &sids[i]);
+ sid_to_fstring(name, &sids[i]);
d_printf("%s\n", name);
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index d546c83357..ca3279ee3a 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -535,11 +535,13 @@ static NTSTATUS fetch_account_info(uint32 rid, SAM_ACCOUNT_INFO *delta)
sid_copy(&user_sid, get_global_sam_sid());
sid_append_rid(&user_sid, delta->user_rid);
- DEBUG(3, ("Attempting to find SID %s for user %s in the passdb\n", sid_to_string(sid_string, &user_sid), account));
+ DEBUG(3, ("Attempting to find SID %s for user %s in the passdb\n",
+ sid_to_fstring(sid_string, &user_sid), account));
if (!pdb_getsampwsid(sam_account, &user_sid)) {
sam_account_from_delta(sam_account, delta);
DEBUG(3, ("Attempting to add user SID %s for user %s in the passdb\n",
- sid_to_string(sid_string, &user_sid), pdb_get_username(sam_account)));
+ sid_to_fstring(sid_string, &user_sid),
+ pdb_get_username(sam_account)));
if (!NT_STATUS_IS_OK(pdb_add_sam_account(sam_account))) {
DEBUG(1, ("SAM Account for %s failed to be added to the passdb!\n",
account));
@@ -548,7 +550,8 @@ static NTSTATUS fetch_account_info(uint32 rid, SAM_ACCOUNT_INFO *delta)
} else {
sam_account_from_delta(sam_account, delta);
DEBUG(3, ("Attempting to update user SID %s for user %s in the passdb\n",
- sid_to_string(sid_string, &user_sid), pdb_get_username(sam_account)));
+ sid_to_fstring(sid_string, &user_sid),
+ pdb_get_username(sam_account)));
if (!NT_STATUS_IS_OK(pdb_update_sam_account(sam_account))) {
DEBUG(1, ("SAM Account for %s failed to be updated in the passdb!\n",
account));
@@ -603,7 +606,7 @@ static NTSTATUS fetch_group_info(uint32 rid, SAM_GROUP_INFO *delta)
/* add the group to the mapping table */
sid_copy(&group_sid, get_global_sam_sid());
sid_append_rid(&group_sid, rid);
- sid_to_string(sid_string, &group_sid);
+ sid_to_fstring(sid_string, &group_sid);
if (pdb_getgrsid(&map, group_sid)) {
if ( map.gid != -1 )
@@ -794,7 +797,7 @@ static NTSTATUS fetch_alias_info(uint32 rid, SAM_ALIAS_INFO *delta,
/* Find out whether the group is already mapped */
sid_copy(&alias_sid, &dom_sid);
sid_append_rid(&alias_sid, rid);
- sid_to_string(sid_string, &alias_sid);
+ sid_to_fstring(sid_string, &alias_sid);
if (pdb_getgrsid(&map, alias_sid)) {
grp = getgrgid(map.gid);
@@ -1838,7 +1841,7 @@ static NTSTATUS fetch_database_to_ldif(struct rpc_pipe_client *pipe_hnd,
}
/* Get the sid */
- sid_to_string(sid, &dom_sid);
+ sid_to_fstring(sid, &dom_sid);
/* Get the ldap suffix */
suffix = lp_ldap_suffix();
@@ -2117,10 +2120,10 @@ NTSTATUS rpc_vampire_internals(const DOM_SID *domain_sid,
"workgroup=%s\n\n in your smb.conf?\n",
domain_name,
get_global_sam_name(),
- sid_to_string(my_dom_sid_str,
- get_global_sam_sid()),
- domain_name, sid_to_string(rem_dom_sid_str,
- domain_sid),
+ sid_to_fstring(my_dom_sid_str,
+ get_global_sam_sid()),
+ domain_name, sid_to_fstring(rem_dom_sid_str,
+ domain_sid),
domain_name);
return NT_STATUS_UNSUCCESSFUL;
}
diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c
index 3af5fd44b8..550157a103 100644
--- a/source3/utils/net_usershare.c
+++ b/source3/utils/net_usershare.c
@@ -423,7 +423,8 @@ static int info_fn(struct file_list *fl, void *priv)
} else {
fstring sidstr;
- sid_to_string(sidstr, &psd->dacl->aces[num_aces].trustee);
+ sid_to_fstring(sidstr,
+ &psd->dacl->aces[num_aces].trustee);
acl_str = talloc_asprintf_append(acl_str,
"%s",
sidstr);
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index f823ea3bfd..958f8e255e 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -168,7 +168,7 @@ static void SidToString(struct cli_state *cli, fstring str, const DOM_SID *sid)
enum lsa_SidType type;
NTSTATUS status;
- sid_to_string(str, sid);
+ sid_to_fstring(str, sid);
if (numeric) {
return;
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index 08a3cc1806..e6aa5e86cf 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -80,7 +80,7 @@ static void SidToString(fstring str, DOM_SID *sid, bool _numeric)
char **names = NULL;
enum lsa_SidType *types = NULL;
- sid_to_string(str, sid);
+ sid_to_fstring(str, sid);
if (_numeric) return;