/* Print results */
for (i = 0; i < (argc - 1); i++) {
- fstring sid_str;
- sid_to_fstring(sid_str, &sids[i]);
- printf("%s %s (%s: %d)\n", argv[i + 1], sid_str,
- sid_type_lookup(types[i]), types[i]);
+ struct dom_sid_buf sid_str;
+ printf("%s %s (%s: %d)\n",
+ argv[i + 1],
+ dom_sid_str_buf(&sids[i], &sid_str),
+ sid_type_lookup(types[i]),
+ types[i]);
}
dcerpc_lsa_Close(b, mem_ctx, &pol, &result);
/* Print results */
for (i = 0; i < (argc - 2); i++) {
- fstring sid_str;
- sid_to_fstring(sid_str, &sids[i]);
- printf("%s %s (%s: %d)\n", argv[i + 2], sid_str,
- sid_type_lookup(types[i]), types[i]);
+ struct dom_sid_buf sid_str;
+ printf("%s %s (%s: %d)\n",
+ argv[i + 2],
+ dom_sid_str_buf(&sids[i], &sid_str),
+ sid_type_lookup(types[i]),
+ types[i]);
}
dcerpc_lsa_Close(b, mem_ctx, &pol, &result);
}
for (i = 0; i < sids.count; i++) {
- fstring sid_str;
- sid_to_fstring(sid_str, sids.sids[i].sid);
- printf("%s %s (%s: %d)\n", argv[i+1], sid_str,
+ struct dom_sid_buf sid_str;
+ printf("%s %s (%s: %d)\n",
+ argv[i+1],
+ dom_sid_str_buf(sids.sids[i].sid, &sid_str),
sid_type_lookup(sids.sids[i].sid_type),
sids.sids[i].sid_type);
}
/* Print results */
for (i = 0; i < (argc - 1); i++) {
- fstring sid_str;
+ struct dom_sid_buf sid_str;
- sid_to_fstring(sid_str, &sids[i]);
+ dom_sid_str_buf(&sids[i], &sid_str);
if (types[i] == SID_NAME_DOMAIN) {
- printf("%s %s (%d)\n", sid_str,
+ printf("%s %s (%d)\n", sid_str.buf,
domains[i] ? domains[i] : "*unknown*",
types[i]);
} else {
- printf("%s %s\\%s (%d)\n", sid_str,
+ printf("%s %s\\%s (%d)\n", sid_str.buf,
domains[i] ? domains[i] : "*unknown*",
names[i] ? names[i] : "*unknown*",
types[i]);
/* Print results */
for (i = 0; i < (argc - 2); i++) {
- fstring sid_str;
+ struct dom_sid_buf sid_str;
- sid_to_fstring(sid_str, &sids[i]);
+ dom_sid_str_buf(&sids[i], &sid_str);
if (types[i] == SID_NAME_DOMAIN) {
- printf("%s %s (%d)\n", sid_str,
+ printf("%s %s (%d)\n", sid_str.buf,
domains[i] ? domains[i] : "*unknown*",
types[i]);
} else {
- printf("%s %s\\%s (%d)\n", sid_str,
+ printf("%s %s\\%s (%d)\n", sid_str.buf,
domains[i] ? domains[i] : "*unknown*",
names[i] ? names[i] : "*unknown*",
types[i]);
/* Print results */
for (i = 0; i < names.count; i++) {
- fstring sid_str;
+ struct dom_sid_buf sid_str;
if (i >= sids.num_sids) {
break;
}
- sid_to_fstring(sid_str, sids.sids[i].sid);
- printf("%s %s (%d)\n", sid_str,
+ printf("%s %s (%d)\n",
+ dom_sid_str_buf(sids.sids[i].sid, &sid_str),
names.names[i].name.string,
names.names[i].sid_type);
}
/* Print results: list of names and sids returned in this
* response. */
for (i = 0; i < domain_list.count; i++) {
- fstring sid_str;
+ struct dom_sid_buf sid_str;
- sid_to_fstring(sid_str, domain_list.domains[i].sid);
printf("%s %s\n",
domain_list.domains[i].name.string ?
domain_list.domains[i].name.string : "*unknown*",
- sid_str);
+ dom_sid_str_buf(domain_list.domains[i].sid,
+ &sid_str));
}
}
printf("found %d SIDs\n\n", sid_array.num_sids);
for (i = 0; i < sid_array.num_sids; i++) {
- fstring sid_str;
+ struct dom_sid_buf sid_str;
- sid_to_fstring(sid_str, sid_array.sids[i].sid);
- printf("%s\n", sid_str);
+ printf("%s\n",
+ dom_sid_str_buf(sid_array.sids[i].sid, &sid_str));
}
dcerpc_lsa_Close(b, mem_ctx, &pol, &result);
}
for (i = 0; i < sid_array.num_sids; i++) {
- fstring sid_str;
+ struct dom_sid_buf sid_str;
- sid_to_fstring(sid_str, sid_array.sids[i].sid);
- printf("\tsid:[%s]\n", sid_str);
+ printf("\tsid:[%s]\n",
+ dom_sid_str_buf(sid_array.sids[i].sid, &sid_str));
}
dcerpc_samr_Close(b, mem_ctx, &alias_pol, &result);
struct policy_handle connect_pol, domain_pol;
NTSTATUS status, result;
uint32_t access_mask = MAXIMUM_ALLOWED_ACCESS;
- fstring sid_string;
struct lsa_String domain_name;
struct dom_sid *sid = NULL;
struct dcerpc_binding_handle *b = cli->binding_handle;
}
if (NT_STATUS_IS_OK(result)) {
- sid_to_fstring(sid_string, sid);
+ struct dom_sid_buf sid_str;
printf("SAMR_LOOKUP_DOMAIN: Domain Name: %s Domain SID: %s\n",
- argv[1], sid_string);
+ argv[1],
+ dom_sid_str_buf(sid, &sid_str));
}
dcerpc_samr_Close(b, mem_ctx, &domain_pol, &result);