[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1047-g92d3210
The branch, master has been updated via 92d321006d1748ac47cf9b52330212f4ae03f502 (commit) from 8e06e945b6b03db825862f2f057f0dfe13ade3a2 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 92d321006d1748ac47cf9b52330212f4ae03f502 Author: Matthias Dieter Wallnöfer Date: Tue Apr 14 10:08:42 2009 +1000 Enable software rollout through AD This enables the sofware rollout feature in Samba4 Signed-off-by: Andrew Bartlett --- Summary of changes: source4/setup/provision_group_policy.ldif | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/setup/provision_group_policy.ldif b/source4/setup/provision_group_policy.ldif index 0f3e1f1..98c09b9 100644 --- a/source4/setup/provision_group_policy.ldif +++ b/source4/setup/provision_group_policy.ldif @@ -1,3 +1,13 @@ +dn: CN=Default Domain Policy,CN=System,${DOMAINDN} +objectClass: top +objectClass: domainPolicy +isCriticalSystemObject: TRUE + +dn: CN=AppCategories,CN=Default Domain Policy,CN=System,${DOMAINDN} +objectClass: top +objectClass: classStore +isCriticalSystemObject: TRUE + dn: CN={${POLICYGUID}},CN=Policies,CN=System,${DOMAINDN} objectClass: top objectClass: container -- Samba Shared Repository
Build status as of Wed Apr 15 00:00:02 2009
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2009-04-14 00:00:12.0 + +++ /home/build/master/cache/broken_results.txt 2009-04-15 00:00:18.0 + @@ -1,9 +1,9 @@ -Build status as of Tue Apr 14 00:00:01 2009 +Build status as of Wed Apr 15 00:00:02 2009 Build counts: Tree Total Broken Panic build_farm 0 0 0 -ccache 28 6 0 +ccache 30 6 0 distcc 0 0 0 ldb 30 30 0 libreplace 30 12 0 @@ -13,9 +13,10 @@ rsync30 12 0 samba-docs 0 0 0 samba-web0 0 0 -samba_3_current 28 18 0 -samba_3_master 28 21 0 -samba_4_0_test 30 29 3 +samba_3_current 28 19 0 +samba_3_master 28 22 0 +samba_3_next 20 14 0 +samba_4_0_test 30 29 5 talloc 30 30 0 tdb 28 10 0
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1046-g8e06e94
The branch, master has been updated via 8e06e945b6b03db825862f2f057f0dfe13ade3a2 (commit) from 4721be488ceb8229d564e4b63ca9937603394e51 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8e06e945b6b03db825862f2f057f0dfe13ade3a2 Author: Jeremy Allison Date: Tue Apr 14 15:19:39 2009 -0700 Ensure a tls key is only generated once - wrap create & destroy in a mutex. Change the function names to add _once to the tls_create & tls_destroy to make this obvious. Jeremy. --- Summary of changes: lib/util/smb_threads.c |9 +++- lib/util/smb_threads.h | 84 --- lib/util/smb_threads_internal.h | 16 ++-- lib/util/talloc_stack.c |2 +- 4 files changed, 71 insertions(+), 40 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/smb_threads.c b/lib/util/smb_threads.c index 8e0e1cd..fa2d8da 100644 --- a/lib/util/smb_threads.c +++ b/lib/util/smb_threads.c @@ -25,8 +25,6 @@ #include "includes.h" -#define NUM_GLOBAL_LOCKS 1 - /* Functions to vector the locking primitives used internally by libsmbclient. @@ -94,14 +92,18 @@ int smb_thread_set_functions(const struct smb_thread_functions *tf) SMB_THREADS_DEF_PTHREAD_IMPLEMENTATION(tf); +void *pkey = NULL; + /* Test function. */ int test_threads(void) { int ret; void *plock = NULL; - smb_thread_set_functions(&tf); + if ((ret = SMB_THREAD_CREATE_TLS_ONCE("test_tls", pkey)) != 0) { + printf("Create tls once error: %d\n", ret); + } if ((ret = SMB_THREAD_CREATE_MUTEX("test", plock)) != 0) { printf("Create lock error: %d\n", ret); } @@ -112,6 +114,7 @@ int test_threads(void) printf("unlock error: %d\n", ret); } SMB_THREAD_DESTROY_MUTEX(plock); + SMB_THREAD_DESTROY_TLS_ONCE(pkey); return 0; } diff --git a/lib/util/smb_threads.h b/lib/util/smb_threads.h index 2ca163b..945e938 100644 --- a/lib/util/smb_threads.h +++ b/lib/util/smb_threads.h @@ -36,10 +36,10 @@ struct smb_thread_functions { const char *location); /* Thread local storage. */ - int (*create_tls)(const char *keyname, + int (*create_tls_once)(const char *keyname, void **ppkey, const char *location); - void (*destroy_tls)(void *pkey, + void (*destroy_tls_once)(void **pkey, const char *location); int (*set_tls)(void *pkey, const void *pval, const char *location); void *(*get_tls)(void *pkey, const char *location); @@ -53,49 +53,69 @@ extern const struct smb_thread_functions *global_tfp; \ static int smb_create_mutex_pthread(const char *lockname, void **pplock, const char *location) \ { \ -pthread_mutex_t *pmut = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t)); \ -if (!pmut) { \ -return ENOMEM; \ -} \ -pthread_mutex_init(pmut, NULL); \ -*pplock = (void *)pmut; \ -return 0; \ + pthread_mutex_t *pmut = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t)); \ + if (!pmut) { \ + return ENOMEM; \ + } \ + pthread_mutex_init(pmut, NULL); \ + *pplock = (void *)pmut; \ + return 0; \ } \ \ static void smb_destroy_mutex_pthread(void *plock, const char *location) \ { \ -pthread_mutex_destroy((pthread_mutex_t *)plock); \ + pthread_mutex_destroy((pthread_mutex_t *)plock); \ free(plock); \ } \ \ static int smb_lock_pthread(void *plock, enum smb_thread_lock_type lock_type, const char *location) \ { \ -if (lock_type == SMB_THREAD_UNLOCK) { \ -return pthread_mutex_unlock((pthread_mutex_t *)plock); \ -} else { \ -return pthread_mutex_lock((pthread_mutex_t *)plock); \ -} \ + if (lock_type == SMB_THREAD_UNLOCK) { \ + return pthread_mutex_unlock((pthread_mutex_t *)plock); \ + } else { \ + return pthread_mutex_lock((pthread_mutex_t *)plock); \ + } \ } \ \ -static int smb_create_tls_pthread(const char *keyname, void **ppkey, const char *location) \ +static pthread_mutex_t create_tls_mutex = PTHREAD_MUTEX_INITIALIZER; \ + \ +static int smb_create_tls_once_pthread(const char *keyname, void **ppkey, const char *location) \ { \ -int ret; \ -pthread_key_t *pkey = (pthread_key_t *)malloc(sizeof(pthread_key_t)); \ -if (!pkey) { \ -return ENOMEM; \ -} \ -ret = pthread_key_create(pkey, NULL); \ -if (ret) { \ -return ret; \ -} \ -*ppkey = (void *)pkey; \ -return 0;
[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-753-g90643d5
The branch, v3-4-test has been updated via 90643d5d5457959cf18a4b99f6ecb1bb6fe0 (commit) from cb96e70a1d9112d9e4fff1fda4cf64abc7985347 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log - commit 90643d5d5457959cf18a4b99f6ecb1bb6fe0 Author: Günther Deschner Date: Tue Apr 14 23:19:25 2009 +0200 s3-spoolss: Fix format of description string in spoolss_PrinterInfo1. This is what windows does and should get us closer to show the appropriate printer location string in explorer. Guenther (cherry picked from commit 4721be488ceb8229d564e4b63ca9937603394e51) --- Summary of changes: source3/rpc_server/srv_spoolss_nt.c | 16 ++-- 1 files changed, 6 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index effbb92..d114152 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -4128,25 +4128,21 @@ static WERROR construct_printer_info1(TALLOC_CTX *mem_ctx, struct spoolss_PrinterInfo1 *r, int snum) { - char *chaine = NULL; 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)); - chaine = talloc_asprintf(mem_ctx, - "%s,%s,%s", ntprinter->info_2->printername, - ntprinter->info_2->drivername, lp_comment(snum)); } else { r->comment = talloc_strdup(mem_ctx, ntprinter->info_2->comment); /* saved comment */ - chaine = talloc_asprintf(mem_ctx, - "%s,%s,%s", ntprinter->info_2->printername, - ntprinter->info_2->drivername, ntprinter->info_2->comment); } - W_ERROR_HAVE_NO_MEMORY(chaine); W_ERROR_HAVE_NO_MEMORY(r->comment); - r->description = talloc_strdup(mem_ctx, chaine); - W_ERROR_HAVE_NO_MEMORY(r->description); r->name = talloc_strdup(mem_ctx, ntprinter->info_2->printername); W_ERROR_HAVE_NO_MEMORY(r->name); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1045-g4721be4
The branch, master has been updated via 4721be488ceb8229d564e4b63ca9937603394e51 (commit) from ca3de0103b545c86c8507dfc7d042f1838d5dfb2 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4721be488ceb8229d564e4b63ca9937603394e51 Author: Günther Deschner Date: Tue Apr 14 23:19:25 2009 +0200 s3-spoolss: Fix format of description string in spoolss_PrinterInfo1. This is what windows does and should get us closer to show the appropriate printer location string in explorer. Guenther --- Summary of changes: source3/rpc_server/srv_spoolss_nt.c | 16 ++-- 1 files changed, 6 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index effbb92..d114152 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -4128,25 +4128,21 @@ static WERROR construct_printer_info1(TALLOC_CTX *mem_ctx, struct spoolss_PrinterInfo1 *r, int snum) { - char *chaine = NULL; 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)); - chaine = talloc_asprintf(mem_ctx, - "%s,%s,%s", ntprinter->info_2->printername, - ntprinter->info_2->drivername, lp_comment(snum)); } else { r->comment = talloc_strdup(mem_ctx, ntprinter->info_2->comment); /* saved comment */ - chaine = talloc_asprintf(mem_ctx, - "%s,%s,%s", ntprinter->info_2->printername, - ntprinter->info_2->drivername, ntprinter->info_2->comment); } - W_ERROR_HAVE_NO_MEMORY(chaine); W_ERROR_HAVE_NO_MEMORY(r->comment); - r->description = talloc_strdup(mem_ctx, chaine); - W_ERROR_HAVE_NO_MEMORY(r->description); r->name = talloc_strdup(mem_ctx, ntprinter->info_2->printername); W_ERROR_HAVE_NO_MEMORY(r->name); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5210-g64c0c6c
The branch, v3-3-test has been updated via 64c0c6cfc6d44a9bb8ea13e56ed6c3d1eee3861e (commit) from f3ec61a77973781ca1f39c345d5e03a9ba9e43ae (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test - Log - commit 64c0c6cfc6d44a9bb8ea13e56ed6c3d1eee3861e Author: Günther Deschner Date: Tue Apr 14 22:39:36 2009 +0200 netdomjoin-gui: make sure to grey out change fields when not running as root. Guenther (cherry picked from commit ca3de0103b545c86c8507dfc7d042f1838d5dfb2) (cherry picked from commit cb96e70a1d9112d9e4fff1fda4cf64abc7985347) --- Summary of changes: .../examples/netdomjoin-gui/netdomjoin-gui.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c index 40a6e41..8164b74 100644 --- a/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c +++ b/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c @@ -78,6 +78,7 @@ typedef struct join_state { gboolean hostname_changed; uint32_t stored_num_ous; char *target_hostname; + uid_t uid; } join_state; static void debug(const char *format, ...) @@ -1440,6 +1441,10 @@ static int draw_main_window(struct join_state *state) /* Entry */ entry = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(entry), 256); + + if (state->uid != 0) { + gtk_widget_set_sensitive(GTK_WIDGET(entry), FALSE); + } g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(callback_enter_computer_description_and_unlock), state); @@ -1526,6 +1531,9 @@ static int draw_main_window(struct join_state *state) G_CALLBACK(callback_do_change), (gpointer)state); gtk_box_pack_start(GTK_BOX(bbox), button, TRUE, TRUE, 0); + if (state->uid != 0) { + gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); + } gtk_widget_show(button); /* Label (hidden) */ @@ -1533,6 +1541,11 @@ static int draw_main_window(struct join_state *state) gtk_label_set_line_wrap(GTK_LABEL(state->label_reboot), TRUE); gtk_misc_set_alignment(GTK_MISC(state->label_reboot), 0, 0); gtk_box_pack_start(GTK_BOX(vbox), state->label_reboot, TRUE, TRUE, 0); + if (state->uid != 0) { + gtk_label_set_text(GTK_LABEL(state->label_reboot), + "You cannot change computer description as you're not running with root permissions"); + } + gtk_widget_show(state->label_reboot); #if 0 @@ -1763,6 +1776,8 @@ static int initialize_join_state(struct join_state *state, return -1; } + state->uid = geteuid(); + state->ctx = ctx; return 0; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-752-gcb96e70
The branch, v3-4-test has been updated via cb96e70a1d9112d9e4fff1fda4cf64abc7985347 (commit) from f2b3fbf0c04a6f9484853da263174a472eb6bb6d (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log - commit cb96e70a1d9112d9e4fff1fda4cf64abc7985347 Author: Günther Deschner Date: Tue Apr 14 22:39:36 2009 +0200 netdomjoin-gui: make sure to grey out change fields when not running as root. Guenther (cherry picked from commit ca3de0103b545c86c8507dfc7d042f1838d5dfb2) --- Summary of changes: .../examples/netdomjoin-gui/netdomjoin-gui.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c index 40a6e41..8164b74 100644 --- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c +++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c @@ -78,6 +78,7 @@ typedef struct join_state { gboolean hostname_changed; uint32_t stored_num_ous; char *target_hostname; + uid_t uid; } join_state; static void debug(const char *format, ...) @@ -1440,6 +1441,10 @@ static int draw_main_window(struct join_state *state) /* Entry */ entry = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(entry), 256); + + if (state->uid != 0) { + gtk_widget_set_sensitive(GTK_WIDGET(entry), FALSE); + } g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(callback_enter_computer_description_and_unlock), state); @@ -1526,6 +1531,9 @@ static int draw_main_window(struct join_state *state) G_CALLBACK(callback_do_change), (gpointer)state); gtk_box_pack_start(GTK_BOX(bbox), button, TRUE, TRUE, 0); + if (state->uid != 0) { + gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); + } gtk_widget_show(button); /* Label (hidden) */ @@ -1533,6 +1541,11 @@ static int draw_main_window(struct join_state *state) gtk_label_set_line_wrap(GTK_LABEL(state->label_reboot), TRUE); gtk_misc_set_alignment(GTK_MISC(state->label_reboot), 0, 0); gtk_box_pack_start(GTK_BOX(vbox), state->label_reboot, TRUE, TRUE, 0); + if (state->uid != 0) { + gtk_label_set_text(GTK_LABEL(state->label_reboot), + "You cannot change computer description as you're not running with root permissions"); + } + gtk_widget_show(state->label_reboot); #if 0 @@ -1763,6 +1776,8 @@ static int initialize_join_state(struct join_state *state, return -1; } + state->uid = geteuid(); + state->ctx = ctx; return 0; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1044-gca3de01
The branch, master has been updated via ca3de0103b545c86c8507dfc7d042f1838d5dfb2 (commit) from 0f1b402848d987f691d6376a624373380e7e2ce6 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ca3de0103b545c86c8507dfc7d042f1838d5dfb2 Author: Günther Deschner Date: Tue Apr 14 22:39:36 2009 +0200 netdomjoin-gui: make sure to grey out change fields when not running as root. Guenther --- Summary of changes: .../examples/netdomjoin-gui/netdomjoin-gui.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c index 40a6e41..8164b74 100644 --- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c +++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c @@ -78,6 +78,7 @@ typedef struct join_state { gboolean hostname_changed; uint32_t stored_num_ous; char *target_hostname; + uid_t uid; } join_state; static void debug(const char *format, ...) @@ -1440,6 +1441,10 @@ static int draw_main_window(struct join_state *state) /* Entry */ entry = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(entry), 256); + + if (state->uid != 0) { + gtk_widget_set_sensitive(GTK_WIDGET(entry), FALSE); + } g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(callback_enter_computer_description_and_unlock), state); @@ -1526,6 +1531,9 @@ static int draw_main_window(struct join_state *state) G_CALLBACK(callback_do_change), (gpointer)state); gtk_box_pack_start(GTK_BOX(bbox), button, TRUE, TRUE, 0); + if (state->uid != 0) { + gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); + } gtk_widget_show(button); /* Label (hidden) */ @@ -1533,6 +1541,11 @@ static int draw_main_window(struct join_state *state) gtk_label_set_line_wrap(GTK_LABEL(state->label_reboot), TRUE); gtk_misc_set_alignment(GTK_MISC(state->label_reboot), 0, 0); gtk_box_pack_start(GTK_BOX(vbox), state->label_reboot, TRUE, TRUE, 0); + if (state->uid != 0) { + gtk_label_set_text(GTK_LABEL(state->label_reboot), + "You cannot change computer description as you're not running with root permissions"); + } + gtk_widget_show(state->label_reboot); #if 0 @@ -1763,6 +1776,8 @@ static int initialize_join_state(struct join_state *state, return -1; } + state->uid = geteuid(); + state->ctx = ctx; return 0; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1043-g0f1b402
The branch, master has been updated via 0f1b402848d987f691d6376a624373380e7e2ce6 (commit) from 27a3118bcf6105848e8200c15ebab910831f73c6 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0f1b402848d987f691d6376a624373380e7e2ce6 Author: Jeremy Allison Date: Tue Apr 14 13:02:29 2009 -0700 Try and fix the S4 build - include thread includes. Jeremy. --- Summary of changes: source4/include/includes.h |4 1 files changed, 4 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/include/includes.h b/source4/include/includes.h index d9b7759..4862a62 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -64,6 +64,10 @@ /* String routines */ #include "../lib/util/safe_string.h" +/* Thread functions. */ +#include "../lib/util/smb_threads.h" +#include "../lib/util/smb_threads_internal.h" + #if 0 /* darn, we can't do this now that we don't link the ldb tools to all the smb libs */ #define TALLOC_ABORT(reason) smb_panic(reason) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1042-g27a3118
The branch, master has been updated via 27a3118bcf6105848e8200c15ebab910831f73c6 (commit) from 48f14949b1b9a377c2af489032de02a0fe4d118b (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 27a3118bcf6105848e8200c15ebab910831f73c6 Author: Jeremy Allison Date: Tue Apr 14 12:23:22 2009 -0700 Make talloc_stack threadsafe using TLS. Volker please check. Passes make test and basic valgrind testing. Jeremy. --- Summary of changes: lib/util/config.mk |1 + lib/util/smb_threads.c | 19 +++- lib/util/smb_threads_internal.h |5 +- lib/util/talloc_stack.c | 93 ++ 4 files changed, 93 insertions(+), 25 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/config.mk b/lib/util/config.mk index 7835fed..1b620d1 100644 --- a/lib/util/config.mk +++ b/lib/util/config.mk @@ -27,6 +27,7 @@ LIBSAMBA-UTIL_OBJ_FILES = $(addprefix $(libutilsrcdir)/, \ become_daemon.o \ rbtree.o \ talloc_stack.o \ + smb_threads.o \ params.o) PUBLIC_HEADERS += $(addprefix $(libutilsrcdir)/, util.h \ diff --git a/lib/util/smb_threads.c b/lib/util/smb_threads.c index 84dec4d..8e0e1cd 100644 --- a/lib/util/smb_threads.c +++ b/lib/util/smb_threads.c @@ -50,8 +50,19 @@ int smb_thread_set_functions(const struct smb_thread_functions *tf) global_tfp = tf; +#if defined(PARANOID_MALLOC_CHECKER) +#ifdef malloc +#undef malloc +#endif +#endif + /* Here we initialize any static locks we're using. */ - global_lock_array = (void **)SMB_MALLOC_ARRAY(void *, NUM_GLOBAL_LOCKS); + global_lock_array = (void **)malloc(sizeof(void *) *NUM_GLOBAL_LOCKS); + +#if defined(PARANOID_MALLOC_CHECKER) +#define malloc(s) __ERROR_DONT_USE_MALLOC_DIRECTLY +#endif + if (global_lock_array == NULL) { return ENOMEM; } @@ -62,9 +73,11 @@ int smb_thread_set_functions(const struct smb_thread_functions *tf) SAFE_FREE(global_lock_array); return ENOMEM; } - global_tfp->create_mutex(name, + if (global_tfp->create_mutex(name, &global_lock_array[i], - __location__); + __location__)) { + smb_panic("smb_thread_set_functions: create mutexes failed"); + } SAFE_FREE(name); } diff --git a/lib/util/smb_threads_internal.h b/lib/util/smb_threads_internal.h index 3208bc2..ad05aae 100644 --- a/lib/util/smb_threads_internal.h +++ b/lib/util/smb_threads_internal.h @@ -44,9 +44,10 @@ } while (0) #define SMB_THREAD_SET_TLS(key, val) \ - (global_tfp ? global_tfp->set_tls((key),(val),__location__) : 0) + (global_tfp ? global_tfp->set_tls((key),(val),__location__) : \ + ((key) = (val), 0)) #define SMB_THREAD_GET_TLS(key) \ - (global_tfp ? global_tfp->get_tls((key), __location__) : NULL) + (global_tfp ? global_tfp->get_tls((key), __location__) : (key)) #endif diff --git a/lib/util/talloc_stack.c b/lib/util/talloc_stack.c index 2f3ea11..a9b6e03 100644 --- a/lib/util/talloc_stack.c +++ b/lib/util/talloc_stack.c @@ -2,6 +2,7 @@ Unix SMB/CIFS implementation. Implement a stack of talloc contexts Copyright (C) Volker Lendecke 2007 + Copyright (C) Jeremy Allison 2009 - made thread safe. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -38,22 +39,65 @@ #include "includes.h" -static int talloc_stacksize; -static int talloc_stack_arraysize; -static TALLOC_CTX **talloc_stack; +struct talloc_stackframe { + int talloc_stacksize; + int talloc_stack_arraysize; + TALLOC_CTX **talloc_stack; +}; + +/* + * In the single threaded case this is a pointer + * to the global talloc_stackframe. In the MT-case + * this is the pointer to the thread-specific key + * used to look up the per-thread talloc_stackframe + * pointer. + */ + +static void *global_ts; + +static struct talloc_stackframe *talloc_stackframe_init(void) +{ +#if defined(PARANOID_MALLOC_CHECKER) +#ifdef malloc +#undef malloc +#endif +#endif + struct talloc_stackframe *ts = + (struct talloc_stackframe *)malloc(sizeof(struct talloc_stackframe)); +#if defined(PARANOID_MALLOC_CHECKER) +#define malloc(s) __ERROR_DONT_USE_MALLOC_DIRECTLY +#endif + + if (!ts) { + smb_panic("talloc_stackframe_init malloc failed"); + } + + ZERO_STRUCTP(ts); + + if (SMB_THREAD_CREATE_TLS("talloc_stackframe", global_ts)) { + smb_panic("talloc_stackframe_init create
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1041-g48f1494
The branch, master has been updated via 48f14949b1b9a377c2af489032de02a0fe4d118b (commit) from 1b9384a11f2957bcfbe9f23e023c79535d4a7bc9 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 48f14949b1b9a377c2af489032de02a0fe4d118b Author: Günther Deschner Date: Tue Apr 14 16:27:05 2009 +0200 libwbclient: Fix undocumented arguments doxygen warnings. Guenther (cherry picked from commit f2b3fbf0c04a6f9484853da263174a472eb6bb6d) --- Summary of changes: nsswitch/libwbclient/wbclient.h | 16 1 files changed, 8 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/nsswitch/libwbclient/wbclient.h b/nsswitch/libwbclient/wbclient.h index 9d29951..d3c1b63 100644 --- a/nsswitch/libwbclient/wbclient.h +++ b/nsswitch/libwbclient/wbclient.h @@ -495,7 +495,7 @@ struct wbcDomainControllerInfoEx { /** * @brief Free library allocated memory * - * @param *p Pointer to free + * @param * Pointer to free * * @return void **/ @@ -520,7 +520,7 @@ wbcErr wbcSidToString(const struct wbcDomainSid *sid, /** * @brief Convert a character string to a binary SID * - * @param *str Character string in the form of S-... + * @param *sid_string Character string in the form of S-... * @param sid Resulting binary SID * * @return #wbcErr @@ -546,7 +546,7 @@ wbcErr wbcGuidToString(const struct wbcGuid *guid, /** * @brief Convert a character string to a binary GUID * - * @param *str Character string + * @param *guid_string Character string * @param guid Resulting binary GUID * * @return #wbcErr @@ -572,7 +572,7 @@ wbcErr wbcInterfaceDetails(struct wbcInterfaceDetails **details); /** * @brief Convert a domain and name to SID * - * @param domain Domain name (possibly "") + * @param dom_nameDomain name (possibly "") * @param nameUser or group name * @param *sidPointer to the resolved domain SID * @param *name_type Pointer to the SID type @@ -588,9 +588,9 @@ wbcErr wbcLookupName(const char *dom_name, * @brief Convert a SID to a domain and name * * @param *sidPointer to the domain SID to be resolved - * @param pdomain Resolved Domain name (possibly "") - * @param pname Resolved User or group name - * @param *pname_type Pointer to the resolved SID type + * @param domain Resolved Domain name (possibly "") + * @param name Resolved User or group name + * @param *name_type Pointer to the resolved SID type * * @return #wbcErr **/ @@ -959,7 +959,7 @@ wbcErr wbcGetGroups(const char *account, * @brief Lookup the current status of a trusted domain * * @param domain Domain to query - * @param *dinfo Pointer to returned domain_info struct + * @param *info Pointer to returned domain_info struct * * @return #wbcErr **/ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-751-gf2b3fbf
The branch, v3-4-test has been updated via f2b3fbf0c04a6f9484853da263174a472eb6bb6d (commit) from e7c9c2f279eaa424ba7cfecd0bfd827520640f5d (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log - commit f2b3fbf0c04a6f9484853da263174a472eb6bb6d Author: Günther Deschner Date: Tue Apr 14 16:27:05 2009 +0200 libwbclient: Fix undocumented arguments doxygen warnings. Guenther --- Summary of changes: nsswitch/libwbclient/wbclient.h | 16 1 files changed, 8 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/nsswitch/libwbclient/wbclient.h b/nsswitch/libwbclient/wbclient.h index 9d29951..d3c1b63 100644 --- a/nsswitch/libwbclient/wbclient.h +++ b/nsswitch/libwbclient/wbclient.h @@ -495,7 +495,7 @@ struct wbcDomainControllerInfoEx { /** * @brief Free library allocated memory * - * @param *p Pointer to free + * @param * Pointer to free * * @return void **/ @@ -520,7 +520,7 @@ wbcErr wbcSidToString(const struct wbcDomainSid *sid, /** * @brief Convert a character string to a binary SID * - * @param *str Character string in the form of S-... + * @param *sid_string Character string in the form of S-... * @param sid Resulting binary SID * * @return #wbcErr @@ -546,7 +546,7 @@ wbcErr wbcGuidToString(const struct wbcGuid *guid, /** * @brief Convert a character string to a binary GUID * - * @param *str Character string + * @param *guid_string Character string * @param guid Resulting binary GUID * * @return #wbcErr @@ -572,7 +572,7 @@ wbcErr wbcInterfaceDetails(struct wbcInterfaceDetails **details); /** * @brief Convert a domain and name to SID * - * @param domain Domain name (possibly "") + * @param dom_nameDomain name (possibly "") * @param nameUser or group name * @param *sidPointer to the resolved domain SID * @param *name_type Pointer to the SID type @@ -588,9 +588,9 @@ wbcErr wbcLookupName(const char *dom_name, * @brief Convert a SID to a domain and name * * @param *sidPointer to the domain SID to be resolved - * @param pdomain Resolved Domain name (possibly "") - * @param pname Resolved User or group name - * @param *pname_type Pointer to the resolved SID type + * @param domain Resolved Domain name (possibly "") + * @param name Resolved User or group name + * @param *name_type Pointer to the resolved SID type * * @return #wbcErr **/ @@ -959,7 +959,7 @@ wbcErr wbcGetGroups(const char *account, * @brief Lookup the current status of a trusted domain * * @param domain Domain to query - * @param *dinfo Pointer to returned domain_info struct + * @param *info Pointer to returned domain_info struct * * @return #wbcErr **/ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-750-ge7c9c2f
The branch, v3-4-test has been updated via e7c9c2f279eaa424ba7cfecd0bfd827520640f5d (commit) from b5faa34596eed3ada7f45db991ef0beb0391ce82 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log - commit e7c9c2f279eaa424ba7cfecd0bfd827520640f5d Author: Günther Deschner Date: Tue Apr 14 14:55:24 2009 +0200 s3-nsswitch: fix make test_wbpad. Guenther (cherry picked from commit 1b9384a11f2957bcfbe9f23e023c79535d4a7bc9) --- Summary of changes: source3/script/tests/wb_pad.sh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/script/tests/wb_pad.sh b/source3/script/tests/wb_pad.sh index f1f5ca2..10cedc8 100755 --- a/source3/script/tests/wb_pad.sh +++ b/source3/script/tests/wb_pad.sh @@ -46,7 +46,7 @@ cleanup() { rmdir $tempdir } -cflags="-I. -I./../lib/replace -Iinclude" +cflags="-I. -I../ -I./../lib/replace -Iinclude" ${CC:-gcc} -m32 $RPM_OPT_FLAGS $CFLAGS -o $tempdir/wb_pad_32 $cflags $tempdir/wb_pad.c if [ $? -ne 0 ]; then cleanup -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1040-g1b9384a
The branch, master has been updated via 1b9384a11f2957bcfbe9f23e023c79535d4a7bc9 (commit) from 74707e8e8e1be2cbaa71fb0442957be2e663cbde (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1b9384a11f2957bcfbe9f23e023c79535d4a7bc9 Author: Günther Deschner Date: Tue Apr 14 14:55:24 2009 +0200 s3-nsswitch: fix make test_wbpad. Guenther --- Summary of changes: source3/script/tests/wb_pad.sh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/script/tests/wb_pad.sh b/source3/script/tests/wb_pad.sh index f1f5ca2..10cedc8 100755 --- a/source3/script/tests/wb_pad.sh +++ b/source3/script/tests/wb_pad.sh @@ -46,7 +46,7 @@ cleanup() { rmdir $tempdir } -cflags="-I. -I./../lib/replace -Iinclude" +cflags="-I. -I../ -I./../lib/replace -Iinclude" ${CC:-gcc} -m32 $RPM_OPT_FLAGS $CFLAGS -o $tempdir/wb_pad_32 $cflags $tempdir/wb_pad.c if [ $? -ne 0 ]; then cleanup -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-749-gb5faa34
The branch, v3-4-test has been updated via b5faa34596eed3ada7f45db991ef0beb0391ce82 (commit) from 3368cd38f710b9d21a3382bfd8971f0f6517eec1 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log - commit b5faa34596eed3ada7f45db991ef0beb0391ce82 Author: Stefan Metzmacher Date: Tue Apr 14 12:45:48 2009 +0200 socket_wrapper: fix the build on systems without ipv6 support metze (cherry picked from commit 74707e8e8e1be2cbaa71fb0442957be2e663cbde) --- Summary of changes: lib/socket_wrapper/socket_wrapper.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c index 193e7a1..cdfdcee 100644 --- a/lib/socket_wrapper/socket_wrapper.c +++ b/lib/socket_wrapper/socket_wrapper.c @@ -1101,8 +1101,10 @@ static uint8_t *swrap_marshall_packet(struct socket_info *si, switch (si->family) { case AF_INET: break; +#ifdef HAVE_IPV6 case AF_INET6: break; +#endif default: return NULL; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1039-g74707e8
The branch, master has been updated via 74707e8e8e1be2cbaa71fb0442957be2e663cbde (commit) from a2ef1fee69771f58c27604ef213405031f42ff96 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 74707e8e8e1be2cbaa71fb0442957be2e663cbde Author: Stefan Metzmacher Date: Tue Apr 14 12:45:48 2009 +0200 socket_wrapper: fix the build on systems without ipv6 support metze --- Summary of changes: lib/socket_wrapper/socket_wrapper.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c index d3853de..d809d8a 100644 --- a/lib/socket_wrapper/socket_wrapper.c +++ b/lib/socket_wrapper/socket_wrapper.c @@ -1102,8 +1102,10 @@ static uint8_t *swrap_marshall_packet(struct socket_info *si, switch (si->family) { case AF_INET: break; +#ifdef HAVE_IPV6 case AF_INET6: break; +#endif default: return NULL; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-748-g3368cd3
The branch, v3-4-test has been updated via 3368cd38f710b9d21a3382bfd8971f0f6517eec1 (commit) via 5fc2656e600791667835775c94a86f788abbcc1a (commit) via 0f48d27d6fb45bc61899916037a5133e3022ec59 (commit) via f78af6c1f1bab5299ef286ada2477e849cf5ba97 (commit) from d99b3025eb54030e90d0c32b2967490d41a1e02a (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log - commit 3368cd38f710b9d21a3382bfd8971f0f6517eec1 Author: Günther Deschner Date: Tue Apr 14 12:10:22 2009 +0200 s4-smbtorture: make sure samba3 does not regress in EnumServicesStatusW call. Guenther (cherry picked from commit a2ef1fee69771f58c27604ef213405031f42ff96) commit 5fc2656e600791667835775c94a86f788abbcc1a Author: Günther Deschner Date: Tue Apr 14 12:08:55 2009 +0200 s3-svcctl: fix memcpy in _svcctl_EnumServicesStatusW(). Make sure we are not copying more than what we have as valid data. Fix from Jeremy. Thanks a lot for watching this so closely! Guenther (cherry picked from commit fa302020ee39bf39bf324983cf8e381232691e76) commit 0f48d27d6fb45bc61899916037a5133e3022ec59 Author: Günther Deschner Date: Tue Apr 14 12:00:39 2009 +0200 s3-spoolss: remove unused dup_nt_devicemode(). Guenther (cherry picked from commit e3ceb0c65333cb870463971021e3af24d82abf26) commit f78af6c1f1bab5299ef286ada2477e849cf5ba97 Author: Günther Deschner Date: Tue Apr 14 01:08:23 2009 +0200 s4-smbtorture: print SPOOLSS_JOB_CONTROL flags in RPC-SPOOLSS test. Guenther (cherry picked from commit 4a2dfbf3c94c8fc4c2cbcbea3b138c5a9674f951) --- Summary of changes: source3/include/proto.h|1 - source3/printing/nt_printing.c | 28 source3/rpc_server/srv_svcctl_nt.c |3 +-- source4/torture/rpc/spoolss.c | 33 - source4/torture/rpc/svcctl.c |3 +++ 5 files changed, 36 insertions(+), 32 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/proto.h b/source3/include/proto.h index d13ac21..5d665c6 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4805,7 +4805,6 @@ WERROR move_driver_to_download_area(struct pipes_struct *p, int pack_devicemode(NT_DEVICEMODE *nt_devmode, uint8 *buf, int buflen); uint32 del_a_printer(const char *sharename); NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename); -NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode); void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr); int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen); int add_new_printer_key( NT_PRINTER_DATA *data, const char *name ); diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index c20171b..f3b938e 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2732,34 +2732,6 @@ NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename) } / - Deepcopy an NT devicemode. -/ - -NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode) -{ - NT_DEVICEMODE *new_nt_devicemode = NULL; - - if ( !nt_devicemode ) - return NULL; - - if ((new_nt_devicemode = (NT_DEVICEMODE *)memdup(nt_devicemode, sizeof(NT_DEVICEMODE))) == NULL) { - DEBUG(0,("dup_nt_devicemode: malloc fail.\n")); - return NULL; - } - - new_nt_devicemode->nt_dev_private = NULL; - if (nt_devicemode->nt_dev_private != NULL) { - if ((new_nt_devicemode->nt_dev_private = (uint8 *)memdup(nt_devicemode->nt_dev_private, nt_devicemode->driverextra)) == NULL) { - SAFE_FREE(new_nt_devicemode); - DEBUG(0,("dup_nt_devicemode: malloc fail.\n")); - return NULL; -} - } - - return new_nt_devicemode; -} - -/ Clean up and deallocate a (maybe partially) allocated NT_DEVICEMODE. / diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c index 0b0ef83..d73f73f 100644 --- a/source3/rpc_server/srv_svcctl_nt.c +++ b/source3/rpc_server/srv_svcctl_nt.c @@ -464,9 +464,8 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p, if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return ntstatus_to_werror(ndr_map_error2ntstatus(ndr_err)); } - blob = ndr_push_blob(ndr); - memcpy(r->out.service, blob.data, r->in.offer
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1038-ga2ef1fe
The branch, master has been updated via a2ef1fee69771f58c27604ef213405031f42ff96 (commit) via fa302020ee39bf39bf324983cf8e381232691e76 (commit) via e3ceb0c65333cb870463971021e3af24d82abf26 (commit) via 4a2dfbf3c94c8fc4c2cbcbea3b138c5a9674f951 (commit) from 786447dea021f97a44582009bf33e28d972dacb4 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a2ef1fee69771f58c27604ef213405031f42ff96 Author: Günther Deschner Date: Tue Apr 14 12:10:22 2009 +0200 s4-smbtorture: make sure samba3 does not regress in EnumServicesStatusW call. Guenther commit fa302020ee39bf39bf324983cf8e381232691e76 Author: Günther Deschner Date: Tue Apr 14 12:08:55 2009 +0200 s3-svcctl: fix memcpy in _svcctl_EnumServicesStatusW(). Make sure we are not copying more than what we have as valid data. Fix from Jeremy. Thanks a lot for watching this so closely! Guenther commit e3ceb0c65333cb870463971021e3af24d82abf26 Author: Günther Deschner Date: Tue Apr 14 12:00:39 2009 +0200 s3-spoolss: remove unused dup_nt_devicemode(). Guenther commit 4a2dfbf3c94c8fc4c2cbcbea3b138c5a9674f951 Author: Günther Deschner Date: Tue Apr 14 01:08:23 2009 +0200 s4-smbtorture: print SPOOLSS_JOB_CONTROL flags in RPC-SPOOLSS test. Guenther --- Summary of changes: source3/include/proto.h|1 - source3/printing/nt_printing.c | 28 source3/rpc_server/srv_svcctl_nt.c |3 +-- source4/torture/rpc/spoolss.c | 33 - source4/torture/rpc/svcctl.c |3 +++ 5 files changed, 36 insertions(+), 32 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/proto.h b/source3/include/proto.h index b8ba8c0..25e81fd 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4843,7 +4843,6 @@ WERROR move_driver_to_download_area(struct pipes_struct *p, int pack_devicemode(NT_DEVICEMODE *nt_devmode, uint8 *buf, int buflen); uint32 del_a_printer(const char *sharename); NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename); -NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode); void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr); int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen); int add_new_printer_key( NT_PRINTER_DATA *data, const char *name ); diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index c20171b..f3b938e 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2732,34 +2732,6 @@ NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename) } / - Deepcopy an NT devicemode. -/ - -NT_DEVICEMODE *dup_nt_devicemode(NT_DEVICEMODE *nt_devicemode) -{ - NT_DEVICEMODE *new_nt_devicemode = NULL; - - if ( !nt_devicemode ) - return NULL; - - if ((new_nt_devicemode = (NT_DEVICEMODE *)memdup(nt_devicemode, sizeof(NT_DEVICEMODE))) == NULL) { - DEBUG(0,("dup_nt_devicemode: malloc fail.\n")); - return NULL; - } - - new_nt_devicemode->nt_dev_private = NULL; - if (nt_devicemode->nt_dev_private != NULL) { - if ((new_nt_devicemode->nt_dev_private = (uint8 *)memdup(nt_devicemode->nt_dev_private, nt_devicemode->driverextra)) == NULL) { - SAFE_FREE(new_nt_devicemode); - DEBUG(0,("dup_nt_devicemode: malloc fail.\n")); - return NULL; -} - } - - return new_nt_devicemode; -} - -/ Clean up and deallocate a (maybe partially) allocated NT_DEVICEMODE. / diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c index 0b0ef83..d73f73f 100644 --- a/source3/rpc_server/srv_svcctl_nt.c +++ b/source3/rpc_server/srv_svcctl_nt.c @@ -464,9 +464,8 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p, if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return ntstatus_to_werror(ndr_map_error2ntstatus(ndr_err)); } - blob = ndr_push_blob(ndr); - memcpy(r->out.service, blob.data, r->in.offered); + memcpy(r->out.service, blob.data, MIN(blob.length, r->in.offered)); } *r->out.needed = (buffer_size > r->in.offered) ? buffer_size : r->in.offered; diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index b188970..d1
[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3550-g6d30895
The branch, v3-2-test has been updated via 6d308951c5b0fec988685f64f040f0770b537efb (commit) from 8203f5f3890afec3ec631f822b0f2e5ddd262b9a (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 6d308951c5b0fec988685f64f040f0770b537efb Author: Michael Adam Date: Mon Sep 8 15:51:57 2008 +0200 packaging(RHEL): add cifs.upcall binary and manpage to client package Michael (cherry picked from commit f1b80bcb58b8aa5c586835dc201ce674b3417835) (cherry picked from commit b4c58d49902d62f25aa0c9289d1857aa2636c028) --- Summary of changes: packaging/RHEL/samba.spec.tmpl |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/packaging/RHEL/samba.spec.tmpl b/packaging/RHEL/samba.spec.tmpl index e0e772c..071fe87 100644 --- a/packaging/RHEL/samba.spec.tmpl +++ b/packaging/RHEL/samba.spec.tmpl @@ -404,6 +404,7 @@ fi %defattr(-,root,root) /sbin/mount.cifs /sbin/umount.cifs +%{_sbindir}/cifs.upcall %{_bindir}/rpcclient %{_bindir}/smbcacls @@ -420,6 +421,7 @@ fi %{_mandir}/man8/mount.cifs.8.* %{_mandir}/man8/umount.cifs.8.* +%{_mandir}/man8/cifs.upcall.8.* %{_mandir}/man8/smbspool.8* %{_mandir}/man1/smbget.1* %{_mandir}/man5/smbgetrc.5* -- Samba Shared Repository