summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2000-07-25 13:15:16 +0000
committerJean-François Micouleau <jfm@samba.org>2000-07-25 13:15:16 +0000
commit5a5ef183799dd84ff453db849e929533e709fd0b (patch)
treecf2f652f9c383a5e181e7437b15c36cbf331b64c /source3/rpc_parse
parentb40175936ae3d7acd6eb3f386c467ba3f9868631 (diff)
downloadsamba-5a5ef183799dd84ff453db849e929533e709fd0b.tar.gz
samba-5a5ef183799dd84ff453db849e929533e709fd0b.tar.bz2
samba-5a5ef183799dd84ff453db849e929533e709fd0b.zip
A rather big change set ! (listed in no particular order)
- changed the default forms flag to 2 - all short architecture name are uppercased - get_short_archi() is now case unsensitive - the drivers TDB is indexed by archi/version/name - implemented code to move drivers from the upload area to the download area. Someone else need to look at that code. - don't return anymore a default driver if it doesn't exist in the TDB. Instead return an error. - cleaned prs_unistr. - #ifdef out jeremy's new SD parsing in printer_info_2 - removed the unused MANGLE_CODE - #ifdef out the security checking in update_printer() as it doesn't work for me. Zap your ntdrivers.tdb, it won't work anymore. J.F. (This used to be commit ac0a145acc0953a6f362497abbf4dfe70aa522a6)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_prs.c57
-rw-r--r--source3/rpc_parse/parse_spoolss.c13
2 files changed, 9 insertions, 61 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 5f43e52975..42a3410752 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -628,61 +628,6 @@ BOOL prs_unistr3(BOOL charmode, char *name, UNISTR3 *str, prs_struct *ps, int de
in little-endian format then do it as a stream of bytes.
********************************************************************/
-#ifndef RPCCLIENT_TEST
-BOOL prs_unistr(char *name, prs_struct *ps, int depth, UNISTR *str)
-{
- int len = 0;
- unsigned char *p = (unsigned char *)str->buffer;
- uint8 *start;
- char *q;
- char zero=0;
-
- for(len = 0; len < (sizeof(str->buffer) / sizeof(str->buffer[0])) &&
- str->buffer[len] != 0; len++)
- ;
-
- q = prs_mem_get(ps, (len+1)*2);
- if (q == NULL)
- return False;
-
- start = (uint8*)q;
-
- for(len = 0; len < (sizeof(str->buffer) / sizeof(str->buffer[0])) &&
- str->buffer[len] != 0; len++) {
- if(ps->bigendian_data) {
- RW_SVAL(ps->io, ps->bigendian_data, q, *p, 0);
- p += 2;
- q += 2;
- } else {
- RW_CVAL(ps->io, q, *p, 0);
- p++;
- q++;
- RW_CVAL(ps->io, q, *p, 0);
- p++;
- q++;
- }
- }
-
- /*
- * even if the string is 'empty' (only an \0 char)
- * at this point the leading \0 hasn't been parsed.
- * so parse it now
- */
-
- RW_CVAL(ps->io, q, zero, 0);
- q++;
- RW_CVAL(ps->io, q, zero, 0);
- q++;
-
- len++;
-
- ps->data_offset += len*2;
-
- dump_data(5+depth, (char *)start, len * 2);
-
- return True;
-}
-#else
BOOL prs_unistr(char *name, prs_struct *ps, int depth, UNISTR *str)
{
int len = 0;
@@ -769,8 +714,6 @@ BOOL prs_unistr(char *name, prs_struct *ps, int depth, UNISTR *str)
return True;
}
-#endif /* RPCCLIENT_TEST */
-
/*******************************************************************
Stream a null-terminated string. len is strlen, and therefore does
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index fd120a57ec..b0223d2803 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -1791,8 +1791,13 @@ BOOL new_smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *i
if (!new_smb_io_relstr("parameters", buffer, depth, &info->parameters))
return False;
- if (!prs_uint32_pre("secdesc_ptr ", ps, depth, &i, &sec_offset))
+#if 0 /* JFMTEST */
+ if (!prs_uint32_pre("secdesc_ptr ", ps, depth, NULL, &sec_offset))
return False;
+#else
+ if (!new_smb_io_relsecdesc("secdesc", buffer, depth, &info->secdesc))
+ return False;
+#endif
if (!prs_uint32("attributes", ps, depth, &info->attributes))
return False;
@@ -1811,12 +1816,13 @@ BOOL new_smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *i
if (!prs_uint32("averageppm", ps, depth, &info->averageppm))
return False;
- if (!prs_uint32_post("secdesc_ptr", ps, depth, &i, sec_offset, info->secdesc ? prs_offset(ps) : 0 ))
+#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;
}
@@ -4285,7 +4291,6 @@ BOOL make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR *q_u,
NEW_BUFFER *buffer, uint32 offered)
{
init_buf_unistr2(&q_u->name, &q_u->name_ptr, servername);
-
init_buf_unistr2(&q_u->environment, &q_u->environment_ptr, env_name);
q_u->level=level;