[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Sat Apr 24 07:11:26 MDT 2010


The branch, master has been updated
       via  c88b83b... s4 dns: Allow to specify static grant entries to be added to the dynamicaly generated named.conf.update
       via  f25ebe3... s4-smbd: Fix compiler warning in prefork smbd.
      from  9244941... lib/zlib/wscript: fix system zlib detection

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


- Log -----------------------------------------------------------------
commit c88b83b7c1abc53866cda4e67c5183e11e31a910
Author: Matthieu Patou <mat at matws.net>
Date:   Fri Apr 23 17:27:05 2010 +0400

    s4 dns: Allow to specify static grant entries to be added to the dynamicaly generated named.conf.update
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit f25ebe37281f84608f13891e08d555e3db817963
Author: Tim Potter <tpot at samba.org>
Date:   Sat Apr 24 11:04:32 2010 +1000

    s4-smbd: Fix compiler warning in prefork smbd.
    
    My first patch in a while...
    
    Tim.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

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

Summary of changes:
 source4/dsdb/dns/dns_update.c  |   20 +++++++++++++++++---
 source4/smbd/process_prefork.c |    2 +-
 2 files changed, 18 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/dns/dns_update.c b/source4/dsdb/dns/dns_update.c
index 0e8f141..1420bb7 100644
--- a/source4/dsdb/dns/dns_update.c
+++ b/source4/dsdb/dns/dns_update.c
@@ -93,8 +93,10 @@ static void dnsupdate_rndc_done(struct tevent_req *subreq)
 static void dnsupdate_rebuild(struct dnsupdate_service *service)
 {
 	int ret;
+	size_t size;
 	struct ldb_result *res;
-	const char *tmp_path, *path;
+	const char *tmp_path, *path, *path_static;
+	char *static_policies;
 	int fd;
 	unsigned int i;
 	const char *attrs[] = { "sAMAccountName", NULL };
@@ -119,13 +121,20 @@ static void dnsupdate_rebuild(struct dnsupdate_service *service)
 		path = private_path(tmp_ctx, service->task->lp_ctx, "named.conf.update");
 	}
 
+	path_static = lp_parm_string(service->task->lp_ctx, NULL, "dnsupdate", "extra_static_grant_rules");
+	if (path_static == NULL) {
+		path_static = private_path(tmp_ctx, service->task->lp_ctx, "named.conf.update.static");
+	}
+
 	tmp_path = talloc_asprintf(tmp_ctx, "%s.tmp", path);
-	if (path == NULL || tmp_path == NULL) {
-		DEBUG(0,(__location__ ": Unable to get paths"));
+	if (path == NULL || tmp_path == NULL || path_static == NULL ) {
+		DEBUG(0,(__location__ ": Unable to get paths\n"));
 		talloc_free(tmp_ctx);
 		return;
 	}
 
+	static_policies = file_load(path_static, &size, 0, tmp_ctx);
+
 	unlink(tmp_path);
 	fd = open(tmp_path, O_CREAT|O_TRUNC|O_WRONLY, 0444);
 	if (fd == -1) {
@@ -136,6 +145,11 @@ static void dnsupdate_rebuild(struct dnsupdate_service *service)
 
 	dprintf(fd, "/* this file is auto-generated - do not edit */\n");
 	dprintf(fd, "update-policy {\n");
+	if( static_policies != NULL ) {
+		dprintf(fd, "/* Start of static entries */\n");
+		dprintf(fd, "%s\n",static_policies);
+		dprintf(fd, "/* End of static entries */\n");
+	}
 	dprintf(fd, "\tgrant %s ms-self * A AAAA;\n", realm);
 	dprintf(fd, "\tgrant administrator@%s wildcard * A AAAA SRV CNAME TXT;\n", realm);
 
diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c
index 721856b..7813189 100644
--- a/source4/smbd/process_prefork.c
+++ b/source4/smbd/process_prefork.c
@@ -192,7 +192,7 @@ static void prefork_new_task(struct tevent_context *ev,
 
 
 /* called when a task goes down */
-_NORETURN_ static void prefork_terminate(struct tevent_context *ev, struct loadparm_context *lp_ctx, const char *reason) 
+static void prefork_terminate(struct tevent_context *ev, struct loadparm_context *lp_ctx, const char *reason)
 {
 	DEBUG(2,("prefork_terminate: reason[%s]\n",reason));
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list