return NT_STATUS_OK;
}
-/****************************************************************************
- display sec_ace structure
- ****************************************************************************/
-static void display_sec_ace(SEC_ACE *ace)
-{
- fstring sid_str;
-
- sid_to_string(sid_str, &ace->trustee);
- printf("\t\tSID: %s\n", sid_str);
-
- printf("\t\ttype:[%d], flags:[0x%02x], mask:[0x%08x]\n",
- ace->type, ace->flags, ace->info.mask);
-}
-
-/****************************************************************************
- display sec_acl structure
- ****************************************************************************/
-static void display_sec_acl(SEC_ACL *acl)
-{
- if (acl->size != 0 && acl->num_aces != 0) {
- int i;
-
- printf("\t\tRevision:[%d]\n", acl->revision);
- for (i = 0; i < acl->num_aces; i++) {
- display_sec_ace(&acl->ace[i]);
- }
- }
-}
-
-/****************************************************************************
- display sec_desc structure
- ****************************************************************************/
-static void display_sec_desc(SEC_DESC *sec)
-{
- fstring sid_str;
-
- printf("\tRevision:[%d]\n", sec->revision);
-
- if (sec->off_owner_sid) {
- sid_to_string(sid_str, sec->owner_sid);
- printf("\tOwner SID: %s\n", sid_str);
- }
-
- if (sec->off_grp_sid) {
- sid_to_string(sid_str, sec->grp_sid);
- printf("\tGroup SID: %s\n", sid_str);
- }
-
- if (sec->off_sacl) display_sec_acl(sec->sacl);
- if (sec->off_dacl) display_sec_acl(sec->dacl);
-}
-
/***********************************************************************
* Get printer information
*/
fstring name;
fstring comm;
- rpcstr_pull(desc, i1->description.buffer, sizeof(desc), 0, STR_TERMINATE);
- rpcstr_pull(name, i1->name.buffer, sizeof(name), 0, STR_TERMINATE);
- rpcstr_pull(comm, i1->comment.buffer, sizeof(comm), 0, STR_TERMINATE);
+ desc[0] = name[0] = comm[0] = 0;
+
+ if (i1->description.buffer)
+ rpcstr_pull(desc, i1->description.buffer, sizeof(desc), 0,
+ STR_TERMINATE);
+
+ if (i1->name.buffer)
+ rpcstr_pull(name, i1->name.buffer, sizeof(name), 0,
+ STR_TERMINATE);
+
+ if (i1->comment.buffer)
+ rpcstr_pull(comm, i1->comment.buffer, sizeof(comm), 0,
+ STR_TERMINATE);
printf("\tflags:[0x%x]\n", i1->flags);
printf("\tname:[%s]\n", name);
}
for (i=0; i<len; i++)
{
- info->dependentfiles[i] = (uint16)str2[i];
+ info->dependentfiles[i] = SSVAL(&info->dependentfiles[i], 0, str2[i]);
}
info->dependentfiles[len] = '\0';