[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Thu Nov 26 11:21:39 MST 2009


The branch, master has been updated
       via  4d0fca4... s3-winbind: properly include netlogon.idl in wbint.idl.
       via  85b6461... s3-spoolss: pre cosmetics: reorder levels in construct_printer_info levels.
      from  4d8118f... tevent: Fix a comment

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4d0fca4472500b92cccff8de5a467fe09eb25455
Author: Günther Deschner <gd at samba.org>
Date:   Thu Nov 26 18:58:36 2009 +0100

    s3-winbind: properly include netlogon.idl in wbint.idl.
    
    Guenther

commit 85b6461174fd43acd7360c79cebe9b73366a8ff9
Author: Günther Deschner <gd at samba.org>
Date:   Thu Nov 26 18:57:24 2009 +0100

    s3-spoolss: pre cosmetics: reorder levels in construct_printer_info levels.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source3/librpc/gen_ndr/ndr_wbint.c  |    1 +
 source3/librpc/gen_ndr/wbint.h      |    1 +
 source3/librpc/idl/wbint.idl        |    2 +-
 source3/rpc_server/srv_spoolss_nt.c |  208 +++++++++++++++++-----------------
 4 files changed, 107 insertions(+), 105 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/librpc/gen_ndr/ndr_wbint.c b/source3/librpc/gen_ndr/ndr_wbint.c
index 7c6aac9..97b2976 100644
--- a/source3/librpc/gen_ndr/ndr_wbint.c
+++ b/source3/librpc/gen_ndr/ndr_wbint.c
@@ -4,6 +4,7 @@
 #include "librpc/gen_ndr/ndr_wbint.h"
 
 #include "librpc/gen_ndr/ndr_lsa.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
 _PUBLIC_ enum ndr_err_code ndr_push_wbint_userinfo(struct ndr_push *ndr, int ndr_flags, const struct wbint_userinfo *r)
 {
 	if (ndr_flags & NDR_SCALARS) {
diff --git a/source3/librpc/gen_ndr/wbint.h b/source3/librpc/gen_ndr/wbint.h
index 1c6cdbc..962a87e 100644
--- a/source3/librpc/gen_ndr/wbint.h
+++ b/source3/librpc/gen_ndr/wbint.h
@@ -5,6 +5,7 @@
 #include "libcli/util/ntstatus.h"
 
 #include "librpc/gen_ndr/lsa.h"
+#include "librpc/gen_ndr/netlogon.h"
 #ifndef _HEADER_wbint
 #define _HEADER_wbint
 
diff --git a/source3/librpc/idl/wbint.idl b/source3/librpc/idl/wbint.idl
index 1f0192e..e44f179 100644
--- a/source3/librpc/idl/wbint.idl
+++ b/source3/librpc/idl/wbint.idl
@@ -1,5 +1,5 @@
 #include "idl_types.h"
-import "lsa.idl";
+import "lsa.idl", "netlogon.idl";
 
 [
     uuid("bf09192c-ed60-4928-9dff-d0d7bcb03ed8"),
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index bcc6f5f..55fc1c1 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -3781,6 +3781,110 @@ done:
 }
 
 /********************************************************************
+ * construct_printer_info1
+ * fill a spoolss_PrinterInfo1 struct
+********************************************************************/
+
+static WERROR construct_printer_info1(TALLOC_CTX *mem_ctx,
+				      const NT_PRINTER_INFO_LEVEL *ntprinter,
+				      uint32_t flags,
+				      struct spoolss_PrinterInfo1 *r,
+				      int snum)
+{
+	r->flags		= flags;
+
+	r->description		= talloc_asprintf(mem_ctx, "%s,%s,%s",
+						  ntprinter->info_2->printername,
+						  ntprinter->info_2->drivername,
+						  ntprinter->info_2->location);
+	W_ERROR_HAVE_NO_MEMORY(r->description);
+
+	if (*ntprinter->info_2->comment == '\0') {
+		r->comment	= talloc_strdup(mem_ctx, lp_comment(snum));
+	} else {
+		r->comment	= talloc_strdup(mem_ctx, ntprinter->info_2->comment); /* saved comment */
+	}
+	W_ERROR_HAVE_NO_MEMORY(r->comment);
+
+	r->name			= talloc_strdup(mem_ctx, ntprinter->info_2->printername);
+	W_ERROR_HAVE_NO_MEMORY(r->name);
+
+	return WERR_OK;
+}
+
+/********************************************************************
+ * construct_printer_info2
+ * fill a spoolss_PrinterInfo2 struct
+********************************************************************/
+
+static WERROR construct_printer_info2(TALLOC_CTX *mem_ctx,
+				      const NT_PRINTER_INFO_LEVEL *ntprinter,
+				      struct spoolss_PrinterInfo2 *r,
+				      int snum)
+{
+	int count;
+
+	print_status_struct status;
+
+	count = print_queue_length(snum, &status);
+
+	r->servername		= talloc_strdup(mem_ctx, ntprinter->info_2->servername);
+	W_ERROR_HAVE_NO_MEMORY(r->servername);
+	r->printername		= talloc_strdup(mem_ctx, ntprinter->info_2->printername);
+	W_ERROR_HAVE_NO_MEMORY(r->printername);
+	r->sharename		= talloc_strdup(mem_ctx, lp_servicename(snum));
+	W_ERROR_HAVE_NO_MEMORY(r->sharename);
+	r->portname		= talloc_strdup(mem_ctx, ntprinter->info_2->portname);
+	W_ERROR_HAVE_NO_MEMORY(r->portname);
+	r->drivername		= talloc_strdup(mem_ctx, ntprinter->info_2->drivername);
+	W_ERROR_HAVE_NO_MEMORY(r->drivername);
+
+	if (*ntprinter->info_2->comment == '\0') {
+		r->comment	= talloc_strdup(mem_ctx, lp_comment(snum));
+	} else {
+		r->comment	= talloc_strdup(mem_ctx, ntprinter->info_2->comment);
+	}
+	W_ERROR_HAVE_NO_MEMORY(r->comment);
+
+	r->location		= talloc_strdup(mem_ctx, ntprinter->info_2->location);
+	W_ERROR_HAVE_NO_MEMORY(r->location);
+	r->sepfile		= talloc_strdup(mem_ctx, ntprinter->info_2->sepfile);
+	W_ERROR_HAVE_NO_MEMORY(r->sepfile);
+	r->printprocessor	= talloc_strdup(mem_ctx, ntprinter->info_2->printprocessor);
+	W_ERROR_HAVE_NO_MEMORY(r->printprocessor);
+	r->datatype		= talloc_strdup(mem_ctx, ntprinter->info_2->datatype);
+	W_ERROR_HAVE_NO_MEMORY(r->datatype);
+	r->parameters		= talloc_strdup(mem_ctx, ntprinter->info_2->parameters);
+	W_ERROR_HAVE_NO_MEMORY(r->parameters);
+
+	r->attributes		= ntprinter->info_2->attributes;
+
+	r->priority		= ntprinter->info_2->priority;
+	r->defaultpriority	= ntprinter->info_2->default_priority;
+	r->starttime		= ntprinter->info_2->starttime;
+	r->untiltime		= ntprinter->info_2->untiltime;
+	r->status		= nt_printq_status(status.status);
+	r->cjobs		= count;
+	r->averageppm		= ntprinter->info_2->averageppm;
+
+	r->devmode = construct_dev_mode(mem_ctx, lp_const_servicename(snum));
+	if (!r->devmode) {
+		DEBUG(8,("Returning NULL Devicemode!\n"));
+	}
+
+	r->secdesc		= NULL;
+
+	if (ntprinter->info_2->secdesc_buf && ntprinter->info_2->secdesc_buf->sd_size != 0) {
+		/* don't use talloc_steal() here unless you do a deep steal of all
+		   the SEC_DESC members */
+
+		r->secdesc	= dup_sec_desc(mem_ctx, ntprinter->info_2->secdesc_buf->sd);
+	}
+
+	return WERR_OK;
+}
+
+/********************************************************************
  * construct_printer_info3
  * fill a spoolss_PrinterInfo3 struct
  ********************************************************************/
@@ -3927,110 +4031,6 @@ static WERROR construct_printer_info8(TALLOC_CTX *mem_ctx,
 
 
 /********************************************************************
- * construct_printer_info1
- * fill a spoolss_PrinterInfo1 struct
-********************************************************************/
-
-static WERROR construct_printer_info1(TALLOC_CTX *mem_ctx,
-				      const NT_PRINTER_INFO_LEVEL *ntprinter,
-				      uint32_t flags,
-				      struct spoolss_PrinterInfo1 *r,
-				      int snum)
-{
-	r->flags		= flags;
-
-	r->description		= talloc_asprintf(mem_ctx, "%s,%s,%s",
-						  ntprinter->info_2->printername,
-						  ntprinter->info_2->drivername,
-						  ntprinter->info_2->location);
-	W_ERROR_HAVE_NO_MEMORY(r->description);
-
-	if (*ntprinter->info_2->comment == '\0') {
-		r->comment	= talloc_strdup(mem_ctx, lp_comment(snum));
-	} else {
-		r->comment	= talloc_strdup(mem_ctx, ntprinter->info_2->comment); /* saved comment */
-	}
-	W_ERROR_HAVE_NO_MEMORY(r->comment);
-
-	r->name			= talloc_strdup(mem_ctx, ntprinter->info_2->printername);
-	W_ERROR_HAVE_NO_MEMORY(r->name);
-
-	return WERR_OK;
-}
-
-/********************************************************************
- * construct_printer_info2
- * fill a spoolss_PrinterInfo2 struct
-********************************************************************/
-
-static WERROR construct_printer_info2(TALLOC_CTX *mem_ctx,
-				      const NT_PRINTER_INFO_LEVEL *ntprinter,
-				      struct spoolss_PrinterInfo2 *r,
-				      int snum)
-{
-	int count;
-
-	print_status_struct status;
-
-	count = print_queue_length(snum, &status);
-
-	r->servername		= talloc_strdup(mem_ctx, ntprinter->info_2->servername);
-	W_ERROR_HAVE_NO_MEMORY(r->servername);
-	r->printername		= talloc_strdup(mem_ctx, ntprinter->info_2->printername);
-	W_ERROR_HAVE_NO_MEMORY(r->printername);
-	r->sharename		= talloc_strdup(mem_ctx, lp_servicename(snum));
-	W_ERROR_HAVE_NO_MEMORY(r->sharename);
-	r->portname		= talloc_strdup(mem_ctx, ntprinter->info_2->portname);
-	W_ERROR_HAVE_NO_MEMORY(r->portname);
-	r->drivername		= talloc_strdup(mem_ctx, ntprinter->info_2->drivername);
-	W_ERROR_HAVE_NO_MEMORY(r->drivername);
-
-	if (*ntprinter->info_2->comment == '\0') {
-		r->comment	= talloc_strdup(mem_ctx, lp_comment(snum));
-	} else {
-		r->comment	= talloc_strdup(mem_ctx, ntprinter->info_2->comment);
-	}
-	W_ERROR_HAVE_NO_MEMORY(r->comment);
-
-	r->location		= talloc_strdup(mem_ctx, ntprinter->info_2->location);
-	W_ERROR_HAVE_NO_MEMORY(r->location);
-	r->sepfile		= talloc_strdup(mem_ctx, ntprinter->info_2->sepfile);
-	W_ERROR_HAVE_NO_MEMORY(r->sepfile);
-	r->printprocessor	= talloc_strdup(mem_ctx, ntprinter->info_2->printprocessor);
-	W_ERROR_HAVE_NO_MEMORY(r->printprocessor);
-	r->datatype		= talloc_strdup(mem_ctx, ntprinter->info_2->datatype);
-	W_ERROR_HAVE_NO_MEMORY(r->datatype);
-	r->parameters		= talloc_strdup(mem_ctx, ntprinter->info_2->parameters);
-	W_ERROR_HAVE_NO_MEMORY(r->parameters);
-
-	r->attributes		= ntprinter->info_2->attributes;
-
-	r->priority		= ntprinter->info_2->priority;
-	r->defaultpriority	= ntprinter->info_2->default_priority;
-	r->starttime		= ntprinter->info_2->starttime;
-	r->untiltime		= ntprinter->info_2->untiltime;
-	r->status		= nt_printq_status(status.status);
-	r->cjobs		= count;
-	r->averageppm		= ntprinter->info_2->averageppm;
-
-	r->devmode = construct_dev_mode(mem_ctx, lp_const_servicename(snum));
-	if (!r->devmode) {
-		DEBUG(8,("Returning NULL Devicemode!\n"));
-	}
-
-	r->secdesc		= NULL;
-
-	if (ntprinter->info_2->secdesc_buf && ntprinter->info_2->secdesc_buf->sd_size != 0) {
-		/* don't use talloc_steal() here unless you do a deep steal of all
-		   the SEC_DESC members */
-
-		r->secdesc	= dup_sec_desc(mem_ctx, ntprinter->info_2->secdesc_buf->sd);
-	}
-
-	return WERR_OK;
-}
-
-/********************************************************************
 ********************************************************************/
 
 static bool snum_is_shared_printer(int snum)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list