summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-06-27 01:12:37 +0000
committerGerald Carter <jerry@samba.org>2002-06-27 01:12:37 +0000
commit8587400d28ae53d25bd10d9dcac60713092720d1 (patch)
tree864ce44d15bb38fd05f1e6c5cd5276705a0ffdf2
parentcb8dcb0b60d0bdd13ef20cad9784d783c62775dd (diff)
downloadsamba-8587400d28ae53d25bd10d9dcac60713092720d1.tar.gz
samba-8587400d28ae53d25bd10d9dcac60713092720d1.tar.bz2
samba-8587400d28ae53d25bd10d9dcac60713092720d1.zip
a null grp_sid should have a 0 offset. Also removed a few more unnecessary
prs_align() for sec_desc. (This used to be commit fc3770f281f6344a0589bfe614cd3e559b7259dd)
-rw-r--r--source3/rpc_parse/parse_sec.c16
-rw-r--r--source3/rpc_parse/parse_spoolss.c7
2 files changed, 6 insertions, 17 deletions
diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c
index e97cd261e0..8ae8264d6d 100644
--- a/source3/rpc_parse/parse_sec.c
+++ b/source3/rpc_parse/parse_sec.c
@@ -128,9 +128,6 @@ BOOL sec_io_ace(char *desc, SEC_ACE *psa, prs_struct *ps, int depth)
if(!sec_io_access("info ", &psa->info, ps, depth))
return False;
- if(!prs_align(ps))
- return False;
-
/* check whether object access is present */
if (!sec_ace_object(psa->type)) {
if (!smb_io_dom_sid("trustee ", &psa->trustee , ps, depth))
@@ -675,13 +672,13 @@ SEC_DESC *make_sec_desc(TALLOC_CTX *ctx, uint16 revision,
*sd_size = (size_t)((offset == 0) ? SEC_DESC_HEADER_SIZE : offset);
- if (dst->owner_sid != NULL) {
+ if (dst->owner_sid != NULL)
dst->off_owner_sid = offset_sid;
+
+ /* sid_size() returns 0 if the sid is NULL so this is ok */
+
+ if (dst->grp_sid != NULL)
dst->off_grp_sid = offset_sid + sid_size(dst->owner_sid);
- }
- else
- if (dst->grp_sid != NULL)
- dst->off_grp_sid = offset_sid;
return dst;
@@ -798,8 +795,6 @@ BOOL sec_io_desc(char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth)
if(!smb_io_dom_sid("owner_sid ", psd->owner_sid , ps, depth))
return False;
- if(!prs_align(ps))
- return False;
ps->data_offset = tmp_offset;
}
@@ -821,6 +816,7 @@ BOOL sec_io_desc(char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth)
if(!smb_io_dom_sid("grp_sid", psd->grp_sid, ps, depth))
return False;
+
ps->data_offset = tmp_offset;
}
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index aa7fcd0010..841d303840 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -2367,13 +2367,6 @@ BOOL smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info,
if (!prs_uint32("averageppm", ps, depth, &info->averageppm))
return False;
-#if 0 /* JFMTEST */
- if (!prs_uint32_post("secdesc_ptr", ps, depth, NULL, sec_offset, info->secdesc ? prs_offset(ps)-buffer->struct_start : 0 ))
- return False;
-
- if (!sec_io_desc("secdesc", &info->secdesc, ps, depth))
- return False;
-#endif
return True;
}