svn commit: samba r5546 - branches/SAMBA_3_0/source/utils
trunk/source/utils
gd at samba.org
gd at samba.org
Thu Feb 24 23:25:36 GMT 2005
Author: gd
Date: 2005-02-24 23:25:35 +0000 (Thu, 24 Feb 2005)
New Revision: 5546
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5546
Log:
Fix some comments in "net rpc printer migrate settings"
Guenther
Modified:
branches/SAMBA_3_0/source/utils/net_rpc_printer.c
trunk/source/utils/net_rpc_printer.c
Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_rpc_printer.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_rpc_printer.c 2005-02-24 21:54:52 UTC (rev 5545)
+++ branches/SAMBA_3_0/source/utils/net_rpc_printer.c 2005-02-24 23:25:35 UTC (rev 5546)
@@ -2205,7 +2205,6 @@
char *devicename = NULL, *unc_name = NULL, *url = NULL;
fstring longname;
- const char *keyname = NULL;
uint16 *keylist = NULL, *curkey;
ZERO_STRUCT(ctr_enum);
@@ -2242,7 +2241,7 @@
sizeof(printername), -1, STR_TERMINATE);
rpcstr_pull(sharename, ctr_enum.printers_2[i].sharename.buffer,
sizeof(sharename), -1, STR_TERMINATE);
- keyname = "";
+
/* we can reset NT_STATUS here because we do not
get any real NT_STATUS-codes anymore from now on */
nt_status = NT_STATUS_UNSUCCESSFUL;
@@ -2305,14 +2304,6 @@
/* do not copy security descriptor (we have another command for that) */
ctr_dst.printers_2->secdesc = NULL;
-
- /* devmode->devicename is possibly broken at the moment for all
- strlen(longprinternames) > MAXDEVICENAME (that is 32 chars)
- this fires up thousands of safe_strncpy-debug0-messages
- on my test-servers
- TODO: tell jerry, jra, etc. again.
- */
-
#if 0
if (asprintf(&devicename, "\\\\%s\\%s", longname, printername) < 0) {
nt_status = NT_STATUS_NO_MEMORY;
@@ -2333,7 +2324,7 @@
/* please keep in mind that samba parse_spools gives horribly
crippled results when used to cli_spoolss_enumprinterdataex
- a win2k3-server.
+ a win2k3-server. (Bugzilla #1851)
FIXME: IIRC I've seen it too on a win2k-server
*/
@@ -2341,7 +2332,7 @@
result = cli_spoolss_enumprinterdata(cli, mem_ctx, &hnd_src, p, 0, 0,
&val_needed, &data_needed, NULL);
- /* loop for all printerdata */
+ /* loop for all printerdata of "PrinterDriverData" */
while (W_ERROR_IS_OK(result)) {
REGISTRY_VALUE value;
@@ -2355,7 +2346,7 @@
/* display_value */
if (opt_verbose)
- display_reg_value(NULL, value);
+ display_reg_value(SPOOL_PRINTERDATA_KEY, value);
/* set_value */
if (!net_spoolss_setprinterdata(cli_dst, mem_ctx,
@@ -2374,7 +2365,7 @@
respond to enumprinterkey, win2k does, so continue
in case of an error */
- if (!net_spoolss_enumprinterkey(cli, mem_ctx, &hnd_src, keyname, &keylist)) {
+ if (!net_spoolss_enumprinterkey(cli, mem_ctx, &hnd_src, "", &keylist)) {
printf("got no key-data\n");
continue;
}
Modified: trunk/source/utils/net_rpc_printer.c
===================================================================
--- trunk/source/utils/net_rpc_printer.c 2005-02-24 21:54:52 UTC (rev 5545)
+++ trunk/source/utils/net_rpc_printer.c 2005-02-24 23:25:35 UTC (rev 5546)
@@ -2205,7 +2205,6 @@
char *devicename = NULL, *unc_name = NULL, *url = NULL;
fstring longname;
- const char *keyname = NULL;
uint16 *keylist = NULL, *curkey;
ZERO_STRUCT(ctr_enum);
@@ -2242,7 +2241,7 @@
sizeof(printername), -1, STR_TERMINATE);
rpcstr_pull(sharename, ctr_enum.printers_2[i].sharename.buffer,
sizeof(sharename), -1, STR_TERMINATE);
- keyname = "";
+
/* we can reset NT_STATUS here because we do not
get any real NT_STATUS-codes anymore from now on */
nt_status = NT_STATUS_UNSUCCESSFUL;
@@ -2305,14 +2304,6 @@
/* do not copy security descriptor (we have another command for that) */
ctr_dst.printers_2->secdesc = NULL;
-
- /* devmode->devicename is possibly broken at the moment for all
- strlen(longprinternames) > MAXDEVICENAME (that is 32 chars)
- this fires up thousands of safe_strncpy-debug0-messages
- on my test-servers
- TODO: tell jerry, jra, etc. again.
- */
-
#if 0
if (asprintf(&devicename, "\\\\%s\\%s", longname, printername) < 0) {
nt_status = NT_STATUS_NO_MEMORY;
@@ -2333,7 +2324,7 @@
/* please keep in mind that samba parse_spools gives horribly
crippled results when used to cli_spoolss_enumprinterdataex
- a win2k3-server.
+ a win2k3-server. (Bugzilla #1851)
FIXME: IIRC I've seen it too on a win2k-server
*/
@@ -2341,7 +2332,7 @@
result = cli_spoolss_enumprinterdata(cli, mem_ctx, &hnd_src, p, 0, 0,
&val_needed, &data_needed, NULL);
- /* loop for all printerdata */
+ /* loop for all printerdata of "PrinterDriverData" */
while (W_ERROR_IS_OK(result)) {
REGISTRY_VALUE value;
@@ -2355,7 +2346,7 @@
/* display_value */
if (opt_verbose)
- display_reg_value(NULL, value);
+ display_reg_value(SPOOL_PRINTERDATA_KEY, value);
/* set_value */
if (!net_spoolss_setprinterdata(cli_dst, mem_ctx,
@@ -2374,7 +2365,7 @@
respond to enumprinterkey, win2k does, so continue
in case of an error */
- if (!net_spoolss_enumprinterkey(cli, mem_ctx, &hnd_src, keyname, &keylist)) {
+ if (!net_spoolss_enumprinterkey(cli, mem_ctx, &hnd_src, "", &keylist)) {
printf("got no key-data\n");
continue;
}
More information about the samba-cvs
mailing list