[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Thu Oct 11 10:50:02 MDT 2012


The branch, master has been updated
       via  cabd2b2 s3fs-printing: Simplify the comment and location handling.
       via  49959cf packaging: Add support for reloading systemd services.
      from  c2d1474 provision: Always create DNS user.

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


- Log -----------------------------------------------------------------
commit cabd2b2e960a7d6346b621a4cf37429c944a7720
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Oct 11 14:46:56 2012 +0200

    s3fs-printing: Simplify the comment and location handling.
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Thu Oct 11 18:49:15 CEST 2012 on sn-devel-104

commit 49959cffc5717764cc4a5a654eab63bfe5f21603
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Oct 10 11:30:15 2012 +0200

    packaging: Add support for reloading systemd services.

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

Summary of changes:
 packaging/systemd/nmb.service     |    1 +
 packaging/systemd/samba.service   |    1 +
 packaging/systemd/smb.service     |    1 +
 packaging/systemd/winbind.service |    1 +
 source3/printing/printer_list.c   |   30 +++++++++++++++++-------------
 5 files changed, 21 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/systemd/nmb.service b/packaging/systemd/nmb.service
index a2ecd22..e5e81a1 100644
--- a/packaging/systemd/nmb.service
+++ b/packaging/systemd/nmb.service
@@ -7,6 +7,7 @@ Type=forking
 PIDFile=/run/nmbd.pid
 EnvironmentFile=-/etc/sysconfig/samba
 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 [Install]
 WantedBy=multi-user.target
diff --git a/packaging/systemd/samba.service b/packaging/systemd/samba.service
index d2db18c..e2878d1 100644
--- a/packaging/systemd/samba.service
+++ b/packaging/systemd/samba.service
@@ -8,6 +8,7 @@ PIDFile=/run/samba.pid
 LimitNOFILE=16384
 EnvironmentFile=-/etc/sysconfig/samba
 ExecStart=/usr/sbin/samba $SAMBAOPTIONS
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 [Install]
 WantedBy=multi-user.target
diff --git a/packaging/systemd/smb.service b/packaging/systemd/smb.service
index 70d9842..d0d945a 100644
--- a/packaging/systemd/smb.service
+++ b/packaging/systemd/smb.service
@@ -8,6 +8,7 @@ PIDFile=/run/smbd.pid
 LimitNOFILE=16384
 EnvironmentFile=-/etc/sysconfig/samba
 ExecStart=/usr/sbin/smbd $SMBDOPTIONS
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 [Install]
 WantedBy=multi-user.target
diff --git a/packaging/systemd/winbind.service b/packaging/systemd/winbind.service
index 9ce1b52..eff266f 100644
--- a/packaging/systemd/winbind.service
+++ b/packaging/systemd/winbind.service
@@ -7,6 +7,7 @@ Type=forking
 PIDFile=/run/winbindd.pid
 EnvironmentFile=-/etc/sysconfig/samba
 ExecStart=/usr/sbin/winbindd "$WINBINDOPTIONS"
+ExecReload=/usr/bin/kill -HUP $MAINPID
 
 [Install]
 WantedBy=multi-user.target
diff --git a/source3/printing/printer_list.c b/source3/printing/printer_list.c
index 0afb84b..6e02ee5 100644
--- a/source3/printing/printer_list.c
+++ b/source3/printing/printer_list.c
@@ -148,8 +148,6 @@ NTSTATUS printer_list_set_printer(TALLOC_CTX *mem_ctx,
 	TDB_DATA data;
 	uint64_t time_64;
 	uint32_t time_h, time_l;
-	const char *str = NULL;
-	const char *str2 = NULL;
 	NTSTATUS status;
 	int len;
 
@@ -164,24 +162,25 @@ NTSTATUS printer_list_set_printer(TALLOC_CTX *mem_ctx,
 		return NT_STATUS_NO_MEMORY;
 	}
 
-	if (comment) {
-		str = comment;
-	} else {
-		str = "";
+	if (comment == NULL) {
+		comment = "";
 	}
 
-	if (location) {
-		str2 = location;
-	} else {
-		str2 = "";
+	if (location == NULL) {
+		location = "";
 	}
 
-
 	time_64 = last_refresh;
 	time_l = time_64 & 0xFFFFFFFFL;
 	time_h = time_64 >> 32;
 
-	len = tdb_pack(NULL, 0, PL_DATA_FORMAT, time_h, time_l, name, str, str2);
+	len = tdb_pack(NULL, 0,
+		       PL_DATA_FORMAT,
+		       time_h,
+		       time_l,
+		       name,
+		       comment,
+		       location);
 
 	data.dptr = talloc_array(key, uint8_t, len);
 	if (!data.dptr) {
@@ -192,7 +191,12 @@ NTSTATUS printer_list_set_printer(TALLOC_CTX *mem_ctx,
 	data.dsize = len;
 
 	len = tdb_pack(data.dptr, data.dsize,
-		       PL_DATA_FORMAT, time_h, time_l, name, str, str2);
+		       PL_DATA_FORMAT,
+		       time_h,
+		       time_l,
+		       name,
+		       comment,
+		       location);
 
 	status = dbwrap_store_bystring_upper(db, key, data, TDB_REPLACE);
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list