svn commit: samba r23580 - in branches/SAMBA_3_0_RELEASE: . source/client source/nsswitch

2007-06-21 Thread jerry
Author: jerry
Date: 2007-06-22 04:09:38 + (Fri, 22 Jun 2007)
New Revision: 23580

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23580

Log:
Merge bug fix for 4720 and Jeremy's winbindd_dual.c changes (still testing 
these)
Modified:
   branches/SAMBA_3_0_RELEASE/WHATSNEW.txt
   branches/SAMBA_3_0_RELEASE/source/client/client.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_dual.c


Changeset:
Modified: branches/SAMBA_3_0_RELEASE/WHATSNEW.txt
===
--- branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2007-06-21 23:11:21 UTC (rev 
23579)
+++ branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2007-06-22 04:09:38 UTC (rev 
23580)
@@ -55,6 +55,11 @@
 * Add more netlogon GetDcName() client calls.
 
 
+o   SATOH Fumiyasu <[EMAIL PROTECTED]>
+* BUG 4720: Fix smbclient connections to share names containing 
+  multibyte characters.
+
+
 o   Steve Langasek <[EMAIL PROTECTED]>
 * Allow SIGTERM to cause nmbd to exit on awaiting an interface 
   to come up.

Modified: branches/SAMBA_3_0_RELEASE/source/client/client.c
===
--- branches/SAMBA_3_0_RELEASE/source/client/client.c   2007-06-21 23:11:21 UTC 
(rev 23579)
+++ branches/SAMBA_3_0_RELEASE/source/client/client.c   2007-06-22 04:09:38 UTC 
(rev 23580)
@@ -3915,14 +3915,6 @@
/* if the service has not yet been specified lets see if it is 
available in the popt stack */
if (!service_opt && poptPeekArg(pc)) {
pstrcpy(service, poptGetArg(pc));
-   /* Convert any '/' characters in the service name to 
'\' characters */
-   string_replace(service, '/','\\');
-
-   if (count_chars(service,'\\') < 3) {
-   d_printf("\n%s: Not enough '\\' characters in 
service\n",service);
-   poptPrintUsage(pc, stderr, 0);
-   exit(1);
-   }
service_opt = True;
}
 
@@ -4010,14 +4002,6 @@
/* if the service has not yet been specified lets see if it is 
available in the popt stack */
if (!service_opt && poptPeekArg(pc)) {
pstrcpy(service, poptGetArg(pc));
-   /* Convert any '/' characters in the service name to '\' 
characters */
-   string_replace(service, '/','\\');
-
-   if (count_chars(service,'\\') < 3) {
-   d_printf("\n%s: Not enough '\\' characters in 
service\n",service);
-   poptPrintUsage(pc, stderr, 0);
-   exit(1);
-   }
service_opt = True;
}
 
@@ -4056,6 +4040,16 @@
}

load_interfaces();
+
+   if (service_opt) {
+   /* Convert any '/' characters in the service name to '\' 
characters */
+   string_replace(service, '/','\\');
+   if (count_chars(service,'\\') < 3) {
+   d_printf("\n%s: Not enough '\\' characters in 
service\n",service);
+   poptPrintUsage(pc, stderr, 0);
+   exit(1);
+   }
+   }

if ( strlen(new_workgroup) != 0 )
set_global_myworkgroup( new_workgroup );

Modified: branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_dual.c  2007-06-21 
23:11:21 UTC (rev 23579)
+++ branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_dual.c  2007-06-22 
04:09:38 UTC (rev 23580)
@@ -97,6 +97,8 @@
struct winbindd_response *response;
void (*continuation)(void *private_data, BOOL success);
struct timed_event *reply_timeout_event;
+   pid_t child_pid; /* pid of the child we're waiting on. Used to detect
+   a restart of the child (child->pid != child_pid). */
void *private_data;
 };
 
@@ -174,36 +176,51 @@
struct winbindd_async_request *state =
talloc_get_type_abort(private_data, struct 
winbindd_async_request);
 
+   DEBUG(0,("async_request_timeout_handler: child pid %u is not 
responding. "
+   "Closing connection to it.\n",
+   state->child_pid ));
+
/* Deal with the reply - set to error. */
-
async_reply_recv(private_data, False);
+}
 
-   DEBUG(0,("async_request_timeout_handler: child pid %u is not 
responding. "
-   "Closing connection to it.\n",
-   state->child->pid ));
+/**
+ Common function called on both async send and recv fail.
+ Cleans up the child and schedules the next request.
+**/
 
-   /* Send kill signal to c

Build status as of Fri Jun 22 00:00:02 2007

2007-06-21 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-06-21 
00:01:45.0 +
+++ /home/build/master/cache/broken_results.txt 2007-06-22 00:00:16.0 
+
@@ -1,4 +1,4 @@
-Build status as of Thu Jun 21 00:00:02 2007
+Build status as of Fri Jun 22 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
@@ -8,8 +8,8 @@
 ctdb 0  0  0 
 distcc   2  0  0 
 ldb  35 3  0 
-libreplace   33 9  0 
-lorikeet-heimdal 31 17 0 
+libreplace   33 10 0 
+lorikeet-heimdal 31 15 0 
 pidl 20 4  0 
 ppp  15 9  0 
 python   0  0  0 
@@ -17,7 +17,7 @@
 samba0  0  0 
 samba-docs   0  0  0 
 samba-gtk4  4  0 
-samba4   33 27 13
+samba4   33 26 11
 samba_3_036 17 0 
 smb-build33 33 0 
 talloc   36 8  0 


svn commit: samba r23579 - in branches: SAMBA_3_0/source/param SAMBA_3_0_26/source/param

2007-06-21 Thread obnox
Author: obnox
Date: 2007-06-21 23:11:21 + (Thu, 21 Jun 2007)
New Revision: 23579

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23579

Log:
Up to now, the "allparameters" argument to lp_next_parameter was
not effective for the global section (snum < 0). This checkin
makes it effective for the global section, too.

This does not produce changes in the results of the present calls of
lp_next_parameter: Beside the new use in utils/net_conf.c (which is
hereby fixed), the only calls of lp_next_parameter are in web/swat.c, 
where it is effectively always called with allparameters == 1.

Michael


Modified:
   branches/SAMBA_3_0/source/param/loadparm.c
   branches/SAMBA_3_0_26/source/param/loadparm.c


Changeset:
Modified: branches/SAMBA_3_0/source/param/loadparm.c
===
--- branches/SAMBA_3_0/source/param/loadparm.c  2007-06-21 22:18:42 UTC (rev 
23578)
+++ branches/SAMBA_3_0/source/param/loadparm.c  2007-06-21 23:11:21 UTC (rev 
23579)
@@ -4308,6 +4308,9 @@
&& (parm_table[*i].ptr ==
parm_table[(*i) - 1].ptr))
continue;
+   
+   if (is_default(*i) && !allparameters)
+   continue;
 
return &parm_table[(*i)++];
}

Modified: branches/SAMBA_3_0_26/source/param/loadparm.c
===
--- branches/SAMBA_3_0_26/source/param/loadparm.c   2007-06-21 22:18:42 UTC 
(rev 23578)
+++ branches/SAMBA_3_0_26/source/param/loadparm.c   2007-06-21 23:11:21 UTC 
(rev 23579)
@@ -4311,6 +4311,9 @@
&& (parm_table[*i].ptr ==
parm_table[(*i) - 1].ptr))
continue;
+   
+   if (is_default(*i) && !allparameters)
+   continue;
 
return &parm_table[(*i)++];
}



svn commit: samba r23578 - in branches: SAMBA_3_0/source/registry SAMBA_3_0_26/source/registry

2007-06-21 Thread obnox
Author: obnox
Date: 2007-06-21 22:18:42 + (Thu, 21 Jun 2007)
New Revision: 23578

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23578

Log:
When calling DeleteKey for a key that has subkey(s), Windows
returns WERR_ACCESS_DENIED. This adapts reg_deletekey to behave 
the same way. 

Michael


Modified:
   branches/SAMBA_3_0/source/registry/reg_api.c
   branches/SAMBA_3_0_26/source/registry/reg_api.c


Changeset:
Modified: branches/SAMBA_3_0/source/registry/reg_api.c
===
--- branches/SAMBA_3_0/source/registry/reg_api.c2007-06-21 22:10:41 UTC 
(rev 23577)
+++ branches/SAMBA_3_0/source/registry/reg_api.c2007-06-21 22:18:42 UTC 
(rev 23578)
@@ -386,6 +386,7 @@
TALLOC_CTX *mem_ctx;
char *name, *end;
int num_subkeys;
+   struct registry_key *tmp_key;
 
if (!(mem_ctx = talloc_init("reg_createkey"))) return WERR_NOMEM;
 
@@ -394,18 +395,30 @@
goto error;
}
 
+   /* check if the key has subkeys */
+   err = reg_openkey(mem_ctx, parent, name, REG_KEY_READ, &tmp_key);
+   if (!W_ERROR_IS_OK(err)) {
+   goto error;
+   }
+   if (!W_ERROR_IS_OK(err = fill_subkey_cache(tmp_key))) {
+   goto error;
+   }
+   if (tmp_key->subkeys->num_subkeys > 0) {
+   err = WERR_ACCESS_DENIED;
+   goto error;
+   }
+
+   /* no subkeys - proceed with delete */
if ((end = strrchr(name, '\\')) != NULL) {
-   struct registry_key *tmp;
-
*end = '\0';
 
err = reg_openkey(mem_ctx, parent, name,
- SEC_RIGHTS_CREATE_SUBKEY, &tmp);
+ SEC_RIGHTS_CREATE_SUBKEY, &tmp_key);
if (!W_ERROR_IS_OK(err)) {
goto error;
}
 
-   parent = tmp;
+   parent = tmp_key;
name = end+1;
}
 

Modified: branches/SAMBA_3_0_26/source/registry/reg_api.c
===
--- branches/SAMBA_3_0_26/source/registry/reg_api.c 2007-06-21 22:10:41 UTC 
(rev 23577)
+++ branches/SAMBA_3_0_26/source/registry/reg_api.c 2007-06-21 22:18:42 UTC 
(rev 23578)
@@ -386,6 +386,7 @@
TALLOC_CTX *mem_ctx;
char *name, *end;
int num_subkeys;
+   struct registry_key *tmp_key;
 
if (!(mem_ctx = talloc_init("reg_createkey"))) return WERR_NOMEM;
 
@@ -394,18 +395,30 @@
goto error;
}
 
+   /* check if the key has subkeys */
+   err = reg_openkey(mem_ctx, parent, name, REG_KEY_READ, &tmp_key);
+   if (!W_ERROR_IS_OK(err)) {
+   goto error;
+   }
+   if (!W_ERROR_IS_OK(err = fill_subkey_cache(tmp_key))) {
+   goto error;
+   }
+   if (tmp_key->subkeys->num_subkeys > 0) {
+   err = WERR_ACCESS_DENIED;
+   goto error;
+   }
+
+   /* no subkeys - proceed with delete */
if ((end = strrchr(name, '\\')) != NULL) {
-   struct registry_key *tmp;
-
*end = '\0';
 
err = reg_openkey(mem_ctx, parent, name,
- SEC_RIGHTS_CREATE_SUBKEY, &tmp);
+ SEC_RIGHTS_CREATE_SUBKEY, &tmp_key);
if (!W_ERROR_IS_OK(err)) {
goto error;
}
 
-   parent = tmp;
+   parent = tmp_key;
name = end+1;
}
 



svn commit: samba r23577 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_26/source/nsswitch

2007-06-21 Thread jra
Author: jra
Date: 2007-06-21 22:10:41 + (Thu, 21 Jun 2007)
New Revision: 23577

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23577

Log:
Fix winbindd (sorry). Ensure I set the new child_pid
variable at the correct point just before the write
call is scheduled.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_dual.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2007-06-21 21:17:06 UTC 
(rev 23576)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2007-06-21 22:10:41 UTC 
(rev 23577)
@@ -131,7 +131,6 @@
state->response = response;
state->continuation = continuation;
state->private_data = private_data;
-   state->child_pid = child->pid;
 
DLIST_ADD_END(child->requests, state, struct winbindd_async_request *);
 
@@ -306,6 +305,9 @@
return;
}
 
+   /* Now we know who we're sending to - remember the pid. */
+   request->child_pid = child->pid;
+
setup_async_write(&child->event, request->request,
  sizeof(*request->request),
  async_main_request_sent, request);

Modified: branches/SAMBA_3_0_25/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/winbindd_dual.c   2007-06-21 
21:17:06 UTC (rev 23576)
+++ branches/SAMBA_3_0_25/source/nsswitch/winbindd_dual.c   2007-06-21 
22:10:41 UTC (rev 23577)
@@ -131,7 +131,6 @@
state->response = response;
state->continuation = continuation;
state->private_data = private_data;
-   state->child_pid = child->pid;
 
DLIST_ADD_END(child->requests, state, struct winbindd_async_request *);
 
@@ -306,6 +305,9 @@
return;
}
 
+   /* Now we know who we're sending to - remember the pid. */
+   request->child_pid = child->pid;
+
setup_async_write(&child->event, request->request,
  sizeof(*request->request),
  async_main_request_sent, request);

Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c   2007-06-21 
21:17:06 UTC (rev 23576)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c   2007-06-21 
22:10:41 UTC (rev 23577)
@@ -131,7 +131,6 @@
state->response = response;
state->continuation = continuation;
state->private_data = private_data;
-   state->child_pid = child->pid;
 
DLIST_ADD_END(child->requests, state, struct winbindd_async_request *);
 
@@ -306,6 +305,9 @@
return;
}
 
+   /* Now we know who we're sending to - remember the pid. */
+   request->child_pid = child->pid;
+
setup_async_write(&child->event, request->request,
  sizeof(*request->request),
  async_main_request_sent, request);



svn commit: samba r23576 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_26/source/lib

2007-06-21 Thread jpeach
Author: jpeach
Date: 2007-06-21 21:17:06 + (Thu, 21 Jun 2007)
New Revision: 23576

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23576

Log:
Fix some confusion between HAVE_BROKEN_GETGROUPS and USE_BSD_SETGROUPS.

Modified:
   branches/SAMBA_3_0/source/lib/system.c
   branches/SAMBA_3_0_26/source/lib/system.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/system.c
===
--- branches/SAMBA_3_0/source/lib/system.c  2007-06-21 20:56:56 UTC (rev 
23575)
+++ branches/SAMBA_3_0/source/lib/system.c  2007-06-21 21:17:06 UTC (rev 
23576)
@@ -1022,7 +1022,7 @@
setlen = max;
}
 
-#if defined(BROKEN_GETGROUPS)
+#if defined(HAVE_BROKEN_GETGROUPS)
ret = sys_broken_setgroups(setlen, new_gidset ? new_gidset : gidset);
 #else
ret = setgroups(setlen, new_gidset ? new_gidset : gidset);
@@ -1063,10 +1063,10 @@
return -1;
 #endif /* HAVE_SETGROUPS */
 
-#if defined(HAVE_BROKEN_GETGROUPS)
+#if defined(USE_BSD_SETGROUPS)
+   return sys_bsd_setgroups(primary_gid, setlen, gidset);
+#elif defined(HAVE_BROKEN_GETGROUPS)
return sys_broken_setgroups(setlen, gidset);
-#elif defined(USE_BSD_SETGROUPS)
-   return sys_bsd_setgroups(primary_gid, setlen, gidset);
 #else
return setgroups(setlen, gidset);
 #endif

Modified: branches/SAMBA_3_0_26/source/lib/system.c
===
--- branches/SAMBA_3_0_26/source/lib/system.c   2007-06-21 20:56:56 UTC (rev 
23575)
+++ branches/SAMBA_3_0_26/source/lib/system.c   2007-06-21 21:17:06 UTC (rev 
23576)
@@ -1022,7 +1022,7 @@
setlen = max;
}
 
-#if defined(BROKEN_GETGROUPS)
+#if defined(HAVE_BROKEN_GETGROUPS)
ret = sys_broken_setgroups(setlen, new_gidset ? new_gidset : gidset);
 #else
ret = setgroups(setlen, new_gidset ? new_gidset : gidset);
@@ -1063,10 +1063,10 @@
return -1;
 #endif /* HAVE_SETGROUPS */
 
-#if defined(HAVE_BROKEN_GETGROUPS)
+#if defined(USE_BSD_SETGROUPS)
+   return sys_bsd_setgroups(primary_gid, setlen, gidset);
+#elif defined(HAVE_BROKEN_GETGROUPS)
return sys_broken_setgroups(setlen, gidset);
-#elif defined(USE_BSD_SETGROUPS)
-   return sys_bsd_setgroups(primary_gid, setlen, gidset);
 #else
return setgroups(setlen, gidset);
 #endif



svn commit: samba r23575 - in branches: SAMBA_3_0/source/param SAMBA_3_0_26/source/param

2007-06-21 Thread obnox
Author: obnox
Date: 2007-06-21 20:56:56 + (Thu, 21 Jun 2007)
New Revision: 23575

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23575

Log:
Fix a segfault when lp_load is called before init_registry.

Michael


Modified:
   branches/SAMBA_3_0/source/param/loadparm.c
   branches/SAMBA_3_0_26/source/param/loadparm.c


Changeset:
Modified: branches/SAMBA_3_0/source/param/loadparm.c
===
--- branches/SAMBA_3_0/source/param/loadparm.c  2007-06-21 19:40:51 UTC (rev 
23574)
+++ branches/SAMBA_3_0/source/param/loadparm.c  2007-06-21 20:56:56 UTC (rev 
23575)
@@ -3071,6 +3071,7 @@
if (!reg_tdb) {
DEBUG(0, ("lp_regdb_open: failed to open %s: %s\n",
 lock_path("registry.tdb"), strerror(errno)));
+   goto done;
}
else {
DEBUG(10, ("lp_regdb_open: reg tdb opened.\n"));
@@ -3085,6 +3086,7 @@
/* this is apparently not implemented in the tdb */
}
 
+done:
return reg_tdb;
 }
 

Modified: branches/SAMBA_3_0_26/source/param/loadparm.c
===
--- branches/SAMBA_3_0_26/source/param/loadparm.c   2007-06-21 19:40:51 UTC 
(rev 23574)
+++ branches/SAMBA_3_0_26/source/param/loadparm.c   2007-06-21 20:56:56 UTC 
(rev 23575)
@@ -3072,6 +3072,7 @@
if (!reg_tdb) {
DEBUG(0, ("lp_regdb_open: failed to open %s: %s\n",
 lock_path("registry.tdb"), strerror(errno)));
+   goto done;
}
else {
DEBUG(10, ("lp_regdb_open: reg tdb opened.\n"));
@@ -3086,6 +3087,7 @@
/* this is apparently not implemented in the tdb */
}
 
+done:
return reg_tdb;
 }
 



svn commit: samba r23574 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_26/source/nsswitch

2007-06-21 Thread jra
Author: jra
Date: 2007-06-21 19:40:51 + (Thu, 21 Jun 2007)
New Revision: 23574

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23574

Log:
Remove double-null check (I hate people bitching at me
on the lists :-).
Jeremy.

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_dual.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2007-06-21 18:44:14 UTC 
(rev 23573)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2007-06-21 19:40:51 UTC 
(rev 23574)
@@ -194,9 +194,7 @@
 {
DLIST_REMOVE(state->child->requests, state);
 
-   if (state->reply_timeout_event) {
-   TALLOC_FREE(state->reply_timeout_event);
-   }
+   TALLOC_FREE(state->reply_timeout_event);
 
SMB_ASSERT(state->child_pid != (pid_t)0);
 

Modified: branches/SAMBA_3_0_25/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/winbindd_dual.c   2007-06-21 
18:44:14 UTC (rev 23573)
+++ branches/SAMBA_3_0_25/source/nsswitch/winbindd_dual.c   2007-06-21 
19:40:51 UTC (rev 23574)
@@ -194,9 +194,7 @@
 {
DLIST_REMOVE(state->child->requests, state);
 
-   if (state->reply_timeout_event) {
-   TALLOC_FREE(state->reply_timeout_event);
-   }
+   TALLOC_FREE(state->reply_timeout_event);
 
SMB_ASSERT(state->child_pid != (pid_t)0);
 

Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c   2007-06-21 
18:44:14 UTC (rev 23573)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c   2007-06-21 
19:40:51 UTC (rev 23574)
@@ -194,9 +194,7 @@
 {
DLIST_REMOVE(state->child->requests, state);
 
-   if (state->reply_timeout_event) {
-   TALLOC_FREE(state->reply_timeout_event);
-   }
+   TALLOC_FREE(state->reply_timeout_event);
 
SMB_ASSERT(state->child_pid != (pid_t)0);
 



svn commit: samba r23573 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_26/source/nsswitch

2007-06-21 Thread jra
Author: jra
Date: 2007-06-21 18:44:14 + (Thu, 21 Jun 2007)
New Revision: 23573

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23573

Log:
Cope with terminating winbindd children on read/write/timeout
communication failures. Set timeout to 5 mins. Ensure that
we're terminating the correct child (the one we thought we
were talking to). Still setting up my testing environment
but I have high hopes for this being the fix for the 3.0.25b
showstopper.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_dual.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2007-06-21 17:25:13 UTC 
(rev 23572)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2007-06-21 18:44:14 UTC 
(rev 23573)
@@ -97,6 +97,8 @@
struct winbindd_response *response;
void (*continuation)(void *private_data, BOOL success);
struct timed_event *reply_timeout_event;
+   pid_t child_pid; /* pid of the child we're waiting on. Used to detect
+   a restart of the child (child->pid != child_pid). */
void *private_data;
 };
 
@@ -129,6 +131,7 @@
state->response = response;
state->continuation = continuation;
state->private_data = private_data;
+   state->child_pid = child->pid;
 
DLIST_ADD_END(child->requests, state, struct winbindd_async_request *);
 
@@ -174,36 +177,53 @@
struct winbindd_async_request *state =
talloc_get_type_abort(private_data, struct 
winbindd_async_request);
 
+   DEBUG(0,("async_request_timeout_handler: child pid %u is not 
responding. "
+   "Closing connection to it.\n",
+   state->child_pid ));
+
/* Deal with the reply - set to error. */
-
async_reply_recv(private_data, False);
+}
 
-   DEBUG(0,("async_request_timeout_handler: child pid %u is not 
responding. "
-   "Closing connection to it.\n",
-   state->child->pid ));
+/**
+ Common function called on both async send and recv fail.
+ Cleans up the child and schedules the next request.
+**/
 
-   /* Send kill signal to child. */
-   kill(state->child->pid, SIGTERM);
+static void async_request_fail(struct winbindd_async_request *state)
+{
+   DLIST_REMOVE(state->child->requests, state);
 
-   /* 
-* Close the socket to the child.
-*/
+   if (state->reply_timeout_event) {
+   TALLOC_FREE(state->reply_timeout_event);
+   }
 
-   winbind_child_died(state->child->pid);
+   SMB_ASSERT(state->child_pid != (pid_t)0);
+
+   /* If not already reaped, send kill signal to child. */
+   if (state->child->pid == state->child_pid) {
+   kill(state->child_pid, SIGTERM);
+
+   /* 
+* Close the socket to the child.
+*/
+   winbind_child_died(state->child_pid);
+   }
+
+   state->response->length = sizeof(struct winbindd_response);
+   state->response->result = WINBINDD_ERROR;
+   state->continuation(state->private_data, False);
 }
 
 static void async_request_sent(void *private_data_data, BOOL success)
 {
-   uint32_t timeout = 30;
struct winbindd_async_request *state =
talloc_get_type_abort(private_data_data, struct 
winbindd_async_request);
 
if (!success) {
-   DEBUG(5, ("Could not send async request\n"));
-
-   state->response->length = sizeof(struct winbindd_response);
-   state->response->result = WINBINDD_ERROR;
-   state->continuation(state->private_data, False);
+   DEBUG(5, ("Could not send async request to child pid %u\n",
+   (unsigned int)state->child_pid ));
+   async_request_fail(state);
return;
}
 
@@ -215,25 +235,14 @@
 async_reply_recv, state);
 
/* 
-* Normal timeouts are 30s, but auth requests may take a long
-* time to timeout.
-*/
-
-   if (state->request->cmd == WINBINDD_PAM_AUTH ||
-   state->request->cmd == WINBINDD_PAM_AUTH_CRAP ) {
-
-   timeout = 300;
-   }
-
-   /* 
-* Set up a timeout of 30 seconds for the response.
+* Set up a timeout of 300 seconds for the response.
 * If we don't get it close the child socket and
 * report failure.
 */
 
state->reply_timeout_event = event_add_timed(winbind_event_context(),
NULL,
-  

svn commit: samba r23572 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_25/source/lib SAMBA_3_0_26/source/lib

2007-06-21 Thread jra
Author: jra
Date: 2007-06-21 17:25:13 + (Thu, 21 Jun 2007)
New Revision: 23572

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23572

Log:
Ensure we obey Unicode consortium restrictions. Code
based on patch from MORIYAMA Masayuki <[EMAIL PROTECTED]>.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/lib/iconv.c
   branches/SAMBA_3_0_25/source/lib/iconv.c
   branches/SAMBA_3_0_26/source/lib/iconv.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/iconv.c
===
--- branches/SAMBA_3_0/source/lib/iconv.c   2007-06-21 17:05:59 UTC (rev 
23571)
+++ branches/SAMBA_3_0/source/lib/iconv.c   2007-06-21 17:25:13 UTC (rev 
23572)
@@ -544,6 +544,8 @@
uint8 *uc = (uint8 *)*outbuf;
 
while (in_left >= 1 && out_left >= 2) {
+   unsigned int codepoint;
+
if ((c[0] & 0x80) == 0) {
uc[0] = c[0];
uc[1] = 0;
@@ -560,8 +562,14 @@
errno = EILSEQ;
goto error;
}
-   uc[1] = (c[0]>>2) & 0x7;
-   uc[0] = (c[0]<<6) | (c[1]&0x3f);
+   codepoint = (c[1]&0x3f) | ((c[0]&0x1f)<<6);
+   if (codepoint < 0x80) {
+   /* don't accept UTF-8 characters that are not 
minimally packed */
+   errno = EILSEQ;
+   goto error;
+   }
+   uc[1] = codepoint >> 8;
+   uc[0] = codepoint & 0xff;
c  += 2;
in_left  -= 2;
out_left -= 2;
@@ -576,8 +584,14 @@
errno = EILSEQ;
goto error;
}
-   uc[1] = ((c[0]&0xF)<<4) | ((c[1]>>2)&0xF);
-   uc[0] = (c[1]<<6) | (c[2]&0x3f);
+   codepoint = (c[2]&0x3f) | ((c[1]&0x3f)<<6) | 
((c[0]&0xf)<<12);
+   if (codepoint < 0x800) {
+   /* don't accept UTF-8 characters that are not 
minimally packed */
+   errno = EILSEQ;
+   goto error;
+   }
+   uc[1] = codepoint >> 8;
+   uc[0] = codepoint & 0xff;
c  += 3;
in_left  -= 3;
out_left -= 2;
@@ -586,7 +600,6 @@
}
 
if ((c[0] & 0xf8) == 0xf0) {
-   unsigned int codepoint;
if (in_left < 4 ||
(c[1] & 0xc0) != 0x80 || 
(c[2] & 0xc0) != 0x80 ||
@@ -599,16 +612,10 @@
((c[2]&0x3f)<<6) | 
((c[1]&0x3f)<<12) |
((c[0]&0x7)<<18);
-   if (codepoint < 0x1) {
-   /* accept UTF-8 characters that are not
-  minimally packed, but pack the result */
-   uc[0] = (codepoint & 0xFF);
-   uc[1] = (codepoint >> 8);
-   c += 4;
-   in_left -= 4;
-   out_left -= 2;
-   uc += 2;
-   continue;
+   if (codepoint < 0x1 || codepoint > 0x10) {
+   /* don't accept UTF-8 characters that are not 
minimally packed */
+   errno = EILSEQ;
+   goto error;
}
 
codepoint -= 0x1;

Modified: branches/SAMBA_3_0_25/source/lib/iconv.c
===
--- branches/SAMBA_3_0_25/source/lib/iconv.c2007-06-21 17:05:59 UTC (rev 
23571)
+++ branches/SAMBA_3_0_25/source/lib/iconv.c2007-06-21 17:25:13 UTC (rev 
23572)
@@ -544,6 +544,8 @@
uint8 *uc = (uint8 *)*outbuf;
 
while (in_left >= 1 && out_left >= 2) {
+   unsigned int codepoint;
+
if ((c[0] & 0x80) == 0) {
uc[0] = c[0];
uc[1] = 0;
@@ -560,8 +562,14 @@
errno = EILSEQ;
goto error;
}
-   uc[1] = (c[0]>>2) & 0x7;
-   uc[0] = (c[0]<<6) | (c[1]&0x3f);
+   codepoint = (c[1]&0x3f) | ((c[0]&0x1f)<<6);
+   if (codepoint < 0x80) {
+   /* don't accept UTF-8 characters that are not 
minimally packed */
+   errno = EI

svn commit: samba r23571 - in branches: SAMBA_3_0/source/client SAMBA_3_0_25/source/client SAMBA_3_0_26/source/client

2007-06-21 Thread idra
Author: idra
Date: 2007-06-21 17:05:59 + (Thu, 21 Jun 2007)
New Revision: 23571

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23571

Log:

Fix, parsing of multi byte share names.
Thanks to SATOH Fumiyasu
Fixes 4720

Jerry,
this is a showstopper for 3.0.25b, please grab it into
SAMBA_3_0_RELEASE before cuting the tarballs.

Simo.


Modified:
   branches/SAMBA_3_0/source/client/client.c
   branches/SAMBA_3_0_25/source/client/client.c
   branches/SAMBA_3_0_26/source/client/client.c


Changeset:
Modified: branches/SAMBA_3_0/source/client/client.c
===
--- branches/SAMBA_3_0/source/client/client.c   2007-06-21 15:41:19 UTC (rev 
23570)
+++ branches/SAMBA_3_0/source/client/client.c   2007-06-21 17:05:59 UTC (rev 
23571)
@@ -3970,14 +3970,6 @@
/* if the service has not yet been specified lets see if it is 
available in the popt stack */
if (!service_opt && poptPeekArg(pc)) {
pstrcpy(service, poptGetArg(pc));
-   /* Convert any '/' characters in the service name to 
'\' characters */
-   string_replace(service, '/','\\');
-
-   if (count_chars(service,'\\') < 3) {
-   d_printf("\n%s: Not enough '\\' characters in 
service\n",service);
-   poptPrintUsage(pc, stderr, 0);
-   exit(1);
-   }
service_opt = True;
}
 
@@ -4065,14 +4057,6 @@
/* if the service has not yet been specified lets see if it is 
available in the popt stack */
if (!service_opt && poptPeekArg(pc)) {
pstrcpy(service, poptGetArg(pc));
-   /* Convert any '/' characters in the service name to '\' 
characters */
-   string_replace(service, '/','\\');
-
-   if (count_chars(service,'\\') < 3) {
-   d_printf("\n%s: Not enough '\\' characters in 
service\n",service);
-   poptPrintUsage(pc, stderr, 0);
-   exit(1);
-   }
service_opt = True;
}
 
@@ -4111,6 +4095,16 @@
}

load_interfaces();
+
+   if (service_opt) {
+   /* Convert any '/' characters in the service name to '\' 
characters */
+   string_replace(service, '/','\\');
+   if (count_chars(service,'\\') < 3) {
+   d_printf("\n%s: Not enough '\\' characters in 
service\n",service);
+   poptPrintUsage(pc, stderr, 0);
+   exit(1);
+   }
+   }

if ( strlen(new_workgroup) != 0 )
set_global_myworkgroup( new_workgroup );

Modified: branches/SAMBA_3_0_25/source/client/client.c
===
--- branches/SAMBA_3_0_25/source/client/client.c2007-06-21 15:41:19 UTC 
(rev 23570)
+++ branches/SAMBA_3_0_25/source/client/client.c2007-06-21 17:05:59 UTC 
(rev 23571)
@@ -3921,14 +3921,6 @@
/* if the service has not yet been specified lets see if it is 
available in the popt stack */
if (!service_opt && poptPeekArg(pc)) {
pstrcpy(service, poptGetArg(pc));
-   /* Convert any '/' characters in the service name to 
'\' characters */
-   string_replace(service, '/','\\');
-
-   if (count_chars(service,'\\') < 3) {
-   d_printf("\n%s: Not enough '\\' characters in 
service\n",service);
-   poptPrintUsage(pc, stderr, 0);
-   exit(1);
-   }
service_opt = True;
}
 
@@ -4016,14 +4008,6 @@
/* if the service has not yet been specified lets see if it is 
available in the popt stack */
if (!service_opt && poptPeekArg(pc)) {
pstrcpy(service, poptGetArg(pc));
-   /* Convert any '/' characters in the service name to '\' 
characters */
-   string_replace(service, '/','\\');
-
-   if (count_chars(service,'\\') < 3) {
-   d_printf("\n%s: Not enough '\\' characters in 
service\n",service);
-   poptPrintUsage(pc, stderr, 0);
-   exit(1);
-   }
service_opt = True;
}
 
@@ -4062,6 +4046,16 @@
}

load_interfaces();
+
+   if (service_opt) {
+   /* Convert any '/' characters in the service name to '\' 
characters */
+   string_replace(service, '/','\\');
+   if (count_chars(service,'\\') < 3) {
+   d_printf("\n%s: Not enough '\\' characters in 
service\n",service);
+   poptPrintU

Re: svn commit: samba r23570 - in branches/SAMBA_3_0_25/source/client: .

2007-06-21 Thread Jeremy Allison
On Thu, Jun 21, 2007 at 03:41:20PM +, [EMAIL PROTECTED] wrote:
> Author: vlendec
> Date: 2007-06-21 15:41:19 + (Thu, 21 Jun 2007)
> New Revision: 23570
> 
> WebSVN: 
> http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23570
> 
> Log:
> Merge cli_connect bugfix to 3_0_25.
> 
> Jeremy, I'm surprised to find this in 3_0_25, I thought you had said you
> don't want to see this there. What has changed your mind?

3.0.25b is frozen - this needs to be in 3.0.25c (if we do one).

Jeremy.


svn commit: samba r23570 - in branches/SAMBA_3_0_25/source/client: .

2007-06-21 Thread vlendec
Author: vlendec
Date: 2007-06-21 15:41:19 + (Thu, 21 Jun 2007)
New Revision: 23570

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23570

Log:
Merge cli_connect bugfix to 3_0_25.

Jeremy, I'm surprised to find this in 3_0_25, I thought you had said you
don't want to see this there. What has changed your mind?

Volker

Modified:
   branches/SAMBA_3_0_25/source/client/smbmount.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/client/smbmount.c
===
--- branches/SAMBA_3_0_25/source/client/smbmount.c  2007-06-21 15:12:51 UTC 
(rev 23569)
+++ branches/SAMBA_3_0_25/source/client/smbmount.c  2007-06-21 15:41:19 UTC 
(rev 23570)
@@ -152,7 +152,7 @@
 
/* have to open a new connection */
if (!(c=cli_initialise()) || (cli_set_port(c, smb_port) != smb_port) ||
-   !cli_connect(c, server_n, &ip)) {
+   !NT_STATUS_IS_OK(cli_connect(c, server_n, &ip))) {
DEBUG(0,("%d: Connection to %s failed\n", sys_getpid(), 
server_n));
if (c) {
cli_shutdown(c);



svn commit: samba r23569 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_26/source/lib

2007-06-21 Thread gd
Author: gd
Date: 2007-06-21 15:12:51 + (Thu, 21 Jun 2007)
New Revision: 23569

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23569

Log:
Also dump fd_event in dump_event_list().

Guenther

Modified:
   branches/SAMBA_3_0/source/lib/events.c
   branches/SAMBA_3_0_26/source/lib/events.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/events.c
===
--- branches/SAMBA_3_0/source/lib/events.c  2007-06-21 14:32:09 UTC (rev 
23568)
+++ branches/SAMBA_3_0/source/lib/events.c  2007-06-21 15:12:51 UTC (rev 
23569)
@@ -395,6 +395,7 @@
 void dump_event_list(struct event_context *event_ctx)
 {
struct timed_event *te;
+   struct fd_event *fe;
struct timeval evt, now;
 
if (!event_ctx) {
@@ -409,9 +410,17 @@
 
evt = timeval_until(&now, &te->when);
 
-   DEBUGADD(10,("Event \"%s\" %lx handled in %d seconds\n",
+   DEBUGADD(10,("Timed Event \"%s\" %lx handled in %d seconds\n",
   te->event_name,
   (unsigned long)te,
   (int)evt.tv_sec));
}
+
+   for (fe = event_ctx->fd_events; fe; fe = fe->next) {
+
+   DEBUGADD(10,("FD Event %d %lx, flags: 0x%04x\n",
+  fe->fd,
+  (unsigned long)fe,
+  fe->flags));
+   }
 }

Modified: branches/SAMBA_3_0_26/source/lib/events.c
===
--- branches/SAMBA_3_0_26/source/lib/events.c   2007-06-21 14:32:09 UTC (rev 
23568)
+++ branches/SAMBA_3_0_26/source/lib/events.c   2007-06-21 15:12:51 UTC (rev 
23569)
@@ -395,6 +395,7 @@
 void dump_event_list(struct event_context *event_ctx)
 {
struct timed_event *te;
+   struct fd_event *fe;
struct timeval evt, now;
 
if (!event_ctx) {
@@ -409,9 +410,17 @@
 
evt = timeval_until(&now, &te->when);
 
-   DEBUGADD(10,("Event \"%s\" %lx handled in %d seconds\n",
+   DEBUGADD(10,("Timed Event \"%s\" %lx handled in %d seconds\n",
   te->event_name,
   (unsigned long)te,
   (int)evt.tv_sec));
}
+
+   for (fe = event_ctx->fd_events; fe; fe = fe->next) {
+
+   DEBUGADD(10,("FD Event %d %lx, flags: 0x%04x\n",
+  fe->fd,
+  (unsigned long)fe,
+  fe->flags));
+   }
 }



svn commit: lorikeet r757 - in trunk/heimdal: . kdc

2007-06-21 Thread lha
Author: lha
Date: 2007-06-21 14:52:47 + (Thu, 21 Jun 2007)
New Revision: 757

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=757

Log:
Merged with Heimdal svn revision 21261
Modified:
   trunk/heimdal/ChangeLog
   trunk/heimdal/kdc/krb5tgs.c


Changeset:
Modified: trunk/heimdal/ChangeLog
===
--- trunk/heimdal/ChangeLog 2007-06-21 14:45:24 UTC (rev 756)
+++ trunk/heimdal/ChangeLog 2007-06-21 14:52:47 UTC (rev 757)
@@ -1,5 +1,7 @@
 2007-06-21  Love H�rnquist �strand  <[EMAIL PROTECTED]>
 
+   * kdc/krb5tgs.c: disable anonyous tgs requests
+
* kdc/krb5tgs.c: Don't check PAC on cross realm for now.
 
* kuser/kgetcred.c: Set KRB5_GC_CONSTRAINED_DELEGATION and parse

Modified: trunk/heimdal/kdc/krb5tgs.c
===
--- trunk/heimdal/kdc/krb5tgs.c 2007-06-21 14:45:24 UTC (rev 756)
+++ trunk/heimdal/kdc/krb5tgs.c 2007-06-21 14:52:47 UTC (rev 757)
@@ -33,7 +33,7 @@
 
 #include "kdc_locl.h"
 
-RCSID("$Id: krb5tgs.c 21258 2007-06-21 14:11:01Z lha $");
+RCSID("$Id: krb5tgs.c 21260 2007-06-21 14:48:42Z lha $");
 
 /*
  * return the realm of a krbtgt-ticket or NULL
@@ -475,12 +475,14 @@
et->endtime = min(*et->renew_till, et->endtime);
 }  
 
+#if 0
 /* checks for excess flags */
 if(f.request_anonymous && !config->allow_anonymous){
kdc_log(context, config, 0,
"Request for anonymous ticket");
return KRB5KDC_ERR_BADOPTION;
 }
+#endif
 return 0;
 }
 
@@ -731,10 +733,12 @@
   &rep.ticket.realm);
 _krb5_principal2principalname(&rep.ticket.sname, server->entry.principal);
 copy_Realm(&tgt_name->realm, &rep.crealm);
+/*
 if (f.request_anonymous)
_kdc_make_anonymous_principalname (&rep.cname);
-else
-   copy_PrincipalName(&tgt_name->name, &rep.cname);
+else */
+
+copy_PrincipalName(&tgt_name->name, &rep.cname);
 rep.ticket.tkt_vno = 5;
 
 ek.caddr = et.caddr;



svn commit: lorikeet r756 - in trunk/heimdal/lib/ntlm: .

2007-06-21 Thread lha
Author: lha
Date: 2007-06-21 14:45:24 + (Thu, 21 Jun 2007)
New Revision: 756

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=756

Log:
ignore heimntlm-protos.h
Modified:
   trunk/heimdal/lib/ntlm/


Changeset:

Property changes on: trunk/heimdal/lib/ntlm
___
Name: svn:ignore
   + heimntlm-protos.h




svn commit: samba r23568 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_26/source/nsswitch

2007-06-21 Thread gd
Author: gd
Date: 2007-06-21 14:32:09 + (Thu, 21 Jun 2007)
New Revision: 23568

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23568

Log:
Remove last traces of Heimdal KCM support (and don't misuse wbinfo where a
torture test would be much more appropriate). Fix #4408.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/wbinfo.c
   branches/SAMBA_3_0_25/source/nsswitch/wbinfo.c
   branches/SAMBA_3_0_26/source/nsswitch/wbinfo.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/wbinfo.c
===
--- branches/SAMBA_3_0/source/nsswitch/wbinfo.c 2007-06-21 14:30:40 UTC (rev 
23567)
+++ branches/SAMBA_3_0/source/nsswitch/wbinfo.c 2007-06-21 14:32:09 UTC (rev 
23568)
@@ -1459,37 +1459,16 @@
break;
}
case 'K': {
-   BOOL got_error = False;
uint32 flags =  WBFLAG_PAM_KRB5 |
WBFLAG_PAM_CACHED_LOGIN |
WBFLAG_PAM_FALLBACK_AFTER_KRB5 |
WBFLAG_PAM_INFO3_TEXT;
-   fstring tok;
-   int i;
-   const char *arg[] = { NULL, NULL };
-   const char *cctypes[] = { "FILE", 
- "KCM", 
- "KCM:0", 
- "Garbage", 
- NULL, 
- "0"};
 
-   arg[0] = string_arg;
-
-   while (next_token(arg, tok, LIST_SEP, 
sizeof(tok))) {
-
-   for (i=0; i < ARRAY_SIZE(cctypes); i++) 
{
-   if (!wbinfo_auth_krb5(tok, 
cctypes[i], flags)) {
-   d_fprintf(stderr, 
"Could not authenticate user [%s] with "
-   "Kerberos 
(ccache: %s)\n", tok, cctypes[i]);
-   got_error = True;
-   }
-   }
-   }
-
-   if (got_error)
+   if (!wbinfo_auth_krb5(string_arg, "FILE", 
flags)) {
+   d_fprintf(stderr, "Could not 
authenticate user [%s] with "
+   "Kerberos (ccache: %s)\n", 
string_arg, "FILE");
goto done;
-
+   }
break;
}
case 'k':

Modified: branches/SAMBA_3_0_25/source/nsswitch/wbinfo.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/wbinfo.c  2007-06-21 14:30:40 UTC 
(rev 23567)
+++ branches/SAMBA_3_0_25/source/nsswitch/wbinfo.c  2007-06-21 14:32:09 UTC 
(rev 23568)
@@ -1459,37 +1459,16 @@
break;
}
case 'K': {
-   BOOL got_error = False;
uint32 flags =  WBFLAG_PAM_KRB5 |
WBFLAG_PAM_CACHED_LOGIN |
WBFLAG_PAM_FALLBACK_AFTER_KRB5 |
WBFLAG_PAM_INFO3_TEXT;
-   fstring tok;
-   int i;
-   const char *arg[] = { NULL, NULL };
-   const char *cctypes[] = { "FILE", 
- "KCM", 
- "KCM:0", 
- "Garbage", 
- NULL, 
- "0"};
 
-   arg[0] = string_arg;
-
-   while (next_token(arg, tok, LIST_SEP, 
sizeof(tok))) {
-
-   for (i=0; i < ARRAY_SIZE(cctypes); i++) 
{
-   if (!wbinfo_auth_krb5(tok, 
cctypes[i], flags)) {
-   d_fprintf(stderr, 
"Could not authenticate user [%s] with "
-   "Kerberos 
(ccache: %s)\n", tok, cctypes[i]);
-   got_e

svn commit: samba r23567 - in branches: SAMBA_3_0/source/client SAMBA_3_0_26/source/client

2007-06-21 Thread vlendec
Author: vlendec
Date: 2007-06-21 14:30:40 + (Thu, 21 Jun 2007)
New Revision: 23567

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23567

Log:
Fix bug 4721

Modified:
   branches/SAMBA_3_0/source/client/smbmount.c
   branches/SAMBA_3_0_26/source/client/smbmount.c


Changeset:
Modified: branches/SAMBA_3_0/source/client/smbmount.c
===
--- branches/SAMBA_3_0/source/client/smbmount.c 2007-06-21 14:23:06 UTC (rev 
23566)
+++ branches/SAMBA_3_0/source/client/smbmount.c 2007-06-21 14:30:40 UTC (rev 
23567)
@@ -152,7 +152,7 @@
 
/* have to open a new connection */
if (!(c=cli_initialise()) || (cli_set_port(c, smb_port) != smb_port) ||
-   !cli_connect(c, server_n, &ip)) {
+   !NT_STATUS_IS_OK(cli_connect(c, server_n, &ip))) {
DEBUG(0,("%d: Connection to %s failed\n", sys_getpid(), 
server_n));
if (c) {
cli_shutdown(c);

Modified: branches/SAMBA_3_0_26/source/client/smbmount.c
===
--- branches/SAMBA_3_0_26/source/client/smbmount.c  2007-06-21 14:23:06 UTC 
(rev 23566)
+++ branches/SAMBA_3_0_26/source/client/smbmount.c  2007-06-21 14:30:40 UTC 
(rev 23567)
@@ -152,7 +152,7 @@
 
/* have to open a new connection */
if (!(c=cli_initialise()) || (cli_set_port(c, smb_port) != smb_port) ||
-   !cli_connect(c, server_n, &ip)) {
+   !NT_STATUS_IS_OK(cli_connect(c, server_n, &ip))) {
DEBUG(0,("%d: Connection to %s failed\n", sys_getpid(), 
server_n));
if (c) {
cli_shutdown(c);



svn commit: samba r23566 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_26/source/lib

2007-06-21 Thread obnox
Author: obnox
Date: 2007-06-21 14:23:06 + (Thu, 21 Jun 2007)
New Revision: 23566

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23566

Log:
Fix the sys_bsd_setgroups function. The actual workaround was inactive.

Michael


Modified:
   branches/SAMBA_3_0/source/lib/system.c
   branches/SAMBA_3_0_26/source/lib/system.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/system.c
===
--- branches/SAMBA_3_0/source/lib/system.c  2007-06-21 14:04:55 UTC (rev 
23565)
+++ branches/SAMBA_3_0/source/lib/system.c  2007-06-21 14:23:06 UTC (rev 
23566)
@@ -1006,14 +1006,12 @@
 * and insert it at the front.
 */
if (gidset[0] != primary_gid) {
-   gid_t *new_gidset;
-
new_gidset = SMB_MALLOC_ARRAY(gid_t, setlen + 1);
if (new_gidset == NULL) {
return -1;
}
 
-   memcpy(new_gidset + 1, gidset, ((setlen + 1) * sizeof(gid_t)));
+   memcpy(new_gidset + 1, gidset, (setlen * sizeof(gid_t)));
new_gidset[0] = primary_gid;
setlen++;
}

Modified: branches/SAMBA_3_0_26/source/lib/system.c
===
--- branches/SAMBA_3_0_26/source/lib/system.c   2007-06-21 14:04:55 UTC (rev 
23565)
+++ branches/SAMBA_3_0_26/source/lib/system.c   2007-06-21 14:23:06 UTC (rev 
23566)
@@ -1006,14 +1006,12 @@
 * and insert it at the front.
 */
if (gidset[0] != primary_gid) {
-   gid_t *new_gidset;
-
new_gidset = SMB_MALLOC_ARRAY(gid_t, setlen + 1);
if (new_gidset == NULL) {
return -1;
}
 
-   memcpy(new_gidset + 1, gidset, ((setlen + 1) * sizeof(gid_t)));
+   memcpy(new_gidset + 1, gidset, (setlen * sizeof(gid_t)));
new_gidset[0] = primary_gid;
setlen++;
}



svn commit: lorikeet r755 - in trunk/heimdal: . appl/ftp appl/ftp/ftp appl/ftp/ftpd appl/gssmask appl/su cf doc kdc kuser lib/asn1 lib/gssapi lib/gssapi/krb5 lib/gssapi/mech lib/gssapi/ntlm lib/gssapi

2007-06-21 Thread lha
Author: lha
Date: 2007-06-21 14:19:54 + (Thu, 21 Jun 2007)
New Revision: 755

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=755

Log:
Merged with Heimdal svn revision 21259
Added:
   trunk/heimdal/lib/hx509/test_cert.in
Modified:
   trunk/heimdal/ChangeLog
   trunk/heimdal/appl/ftp/ChangeLog
   trunk/heimdal/appl/ftp/ftp/gssapi.c
   trunk/heimdal/appl/ftp/ftp/security.c
   trunk/heimdal/appl/ftp/ftp/security.h
   trunk/heimdal/appl/ftp/ftpd/ftpd.c
   trunk/heimdal/appl/ftp/ftpd/gss_userok.c
   trunk/heimdal/appl/gssmask/gssmask.c
   trunk/heimdal/appl/su/ChangeLog
   trunk/heimdal/appl/su/su.c
   trunk/heimdal/cf/ChangeLog
   trunk/heimdal/cf/valgrind-suppressions
   trunk/heimdal/cf/wflags.m4
   trunk/heimdal/configure.in
   trunk/heimdal/doc/ack.texi
   trunk/heimdal/kdc/default_config.c
   trunk/heimdal/kdc/digest.c
   trunk/heimdal/kdc/krb5tgs.c
   trunk/heimdal/kuser/kgetcred.c
   trunk/heimdal/lib/asn1/ChangeLog
   trunk/heimdal/lib/gssapi/ChangeLog
   trunk/heimdal/lib/gssapi/krb5/acquire_cred.c
   trunk/heimdal/lib/gssapi/mech/context.c
   trunk/heimdal/lib/gssapi/mech/gss_accept_sec_context.c
   trunk/heimdal/lib/gssapi/mech/gss_display_name.c
   trunk/heimdal/lib/gssapi/mech/gss_display_status.c
   trunk/heimdal/lib/gssapi/mech/gss_duplicate_name.c
   trunk/heimdal/lib/gssapi/ntlm/init_sec_context.c
   trunk/heimdal/lib/gssapi/ntlm/inquire_cred.c
   trunk/heimdal/lib/gssapi/spnego/accept_sec_context.c
   trunk/heimdal/lib/gssapi/test_ntlm.c
   trunk/heimdal/lib/hcrypto/ChangeLog
   trunk/heimdal/lib/hcrypto/rand-fortuna.c
   trunk/heimdal/lib/hcrypto/rand.c
   trunk/heimdal/lib/hx509/ChangeLog
   trunk/heimdal/lib/hx509/Makefile.am
   trunk/heimdal/lib/hx509/hxtool-commands.in
   trunk/heimdal/lib/hx509/hxtool.c
   trunk/heimdal/lib/hx509/test_cms.in
   trunk/heimdal/lib/kadm5/ChangeLog
   trunk/heimdal/lib/kadm5/ipropd_slave.c
   trunk/heimdal/lib/krb5/get_cred.c
   trunk/heimdal/lib/krb5/krb5.h
   trunk/heimdal/lib/krb5/krb5_principal.3
   trunk/heimdal/lib/krb5/misc.c
   trunk/heimdal/lib/krb5/principal.c
   trunk/heimdal/lib/ntlm/ChangeLog
   trunk/heimdal/lib/ntlm/ntlm.c
   trunk/heimdal/lib/ntlm/test_ntlm.c
   trunk/heimdal/lib/ntlm/version-script.map
   trunk/heimdal/tests/ChangeLog
   trunk/heimdal/tests/can/test_can.in


Changeset:
Sorry, the patch is too large (2887 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=755


svn commit: samba r23565 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch SAMBA_3_0_26/source/nsswitch

2007-06-21 Thread gd
Author: gd
Date: 2007-06-21 14:04:55 + (Thu, 21 Jun 2007)
New Revision: 23565

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23565

Log:
Avoid double NULL pointer checks.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_cm.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_dual.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_cm.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2007-06-21 13:05:56 UTC 
(rev 23564)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2007-06-21 14:04:55 UTC 
(rev 23565)
@@ -258,9 +258,7 @@
  "%s (online = %s)\n", domain->name, 
  domain->online ? "True" : "False" ));
 
-   if (domain->check_online_event) {
-   TALLOC_FREE(domain->check_online_event);
-   }
+   TALLOC_FREE(domain->check_online_event);
 
/* Are we still in "startup" mode ? */
 
@@ -312,9 +310,7 @@
DEBUG(10,("set_domain_offline: called for domain %s\n",
domain->name ));
 
-   if (domain->check_online_event) {
-   TALLOC_FREE(domain->check_online_event);
-   }
+   TALLOC_FREE(domain->check_online_event);
 
if (domain->internal) {
DEBUG(3,("set_domain_offline: domain %s is internal - logic 
error.\n",
@@ -426,9 +422,7 @@
 
/* Ensure we have no online timeout checks. */
domain->check_online_timeout = 0;
-   if (domain->check_online_event) {
-   TALLOC_FREE(domain->check_online_event);
-   }
+   TALLOC_FREE(domain->check_online_event);
 
/* Ensure we ignore any pending child messages. */
messaging_deregister(winbind_messaging_context(),

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2007-06-21 13:05:56 UTC 
(rev 23564)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2007-06-21 14:04:55 UTC 
(rev 23565)
@@ -248,9 +248,7 @@
talloc_get_type_abort(private_data, struct 
winbindd_async_request);
struct winbindd_child *child = state->child;
 
-   if (state->reply_timeout_event) {
-   TALLOC_FREE(state->reply_timeout_event);
-   }
+   TALLOC_FREE(state->reply_timeout_event);
 
state->response->length = sizeof(struct winbindd_response);
 
@@ -736,9 +734,7 @@
 
DEBUG(10,("account_lockout_policy_handler called\n"));
 
-   if (child->lockout_policy_event) {
-   TALLOC_FREE(child->lockout_policy_event);
-   }
+   TALLOC_FREE(child->lockout_policy_event);
 
if ( !winbindd_can_contact_domain( child->domain ) ) {
DEBUG(10,("account_lockout_policy_handler: Removing myself 
since I "
@@ -1016,9 +1012,7 @@
 
for (domain = domain_list(); domain; domain = domain->next) {
if (domain != child->domain) {
-   if (domain->check_online_event) {
-   TALLOC_FREE(domain->check_online_event);
-   }
+   TALLOC_FREE(domain->check_online_event);
}
}
 

Modified: branches/SAMBA_3_0_25/source/nsswitch/winbindd_cm.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/winbindd_cm.c 2007-06-21 13:05:56 UTC 
(rev 23564)
+++ branches/SAMBA_3_0_25/source/nsswitch/winbindd_cm.c 2007-06-21 14:04:55 UTC 
(rev 23565)
@@ -249,9 +249,7 @@
DEBUG(10,("check_domain_online_handler: called for domain %s\n",
domain->name ));
 
-   if (domain->check_online_event) {
-   TALLOC_FREE(domain->check_online_event);
-   }
+   TALLOC_FREE(domain->check_online_event);
 
/* Are we still in "startup" mode ? */
 
@@ -303,9 +301,7 @@
DEBUG(10,("set_domain_offline: called for domain %s\n",
domain->name ));
 
-   if (domain->check_online_event) {
-   TALLOC_FREE(domain->check_online_event);
-   }
+   TALLOC_FREE(domain->check_online_event);
 
if (domain->internal) {
DEBUG(3,("set_domain_offline: domain %s is internal - logic 
error.\n",
@@ -400,9 +396,7 @@
 
/* Ensure we have no online timeout checks. */
domain->check_online_timeout = 0;
-   if (domain->check_online_event) {
-   TALLOC_FREE(domain->check_online_event);
-   }
+   TALLOC_FREE(domain->check_online_event);
 
/* Ensure we ignore any pending child messages. */
message_deregister(MSG_WINBIND_TRY_TO_GO_ONLINE);

Modified: branches/SAMBA_3_0_25

svn commit: samba r23562 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_26/source/lib

2007-06-21 Thread gd
Author: gd
Date: 2007-06-21 13:03:27 + (Thu, 21 Jun 2007)
New Revision: 23562

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23562

Log:
Add dump_event_list() for debugging the event list.

Guenther

Modified:
   branches/SAMBA_3_0/source/lib/events.c
   branches/SAMBA_3_0_26/source/lib/events.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/events.c
===
--- branches/SAMBA_3_0/source/lib/events.c  2007-06-21 11:14:12 UTC (rev 
23561)
+++ branches/SAMBA_3_0/source/lib/events.c  2007-06-21 13:03:27 UTC (rev 
23562)
@@ -391,3 +391,27 @@
}
return 0;
 }
+
+void dump_event_list(struct event_context *event_ctx)
+{
+   struct timed_event *te;
+   struct timeval evt, now;
+
+   if (!event_ctx) {
+   return;
+   }
+
+   now = timeval_current();
+
+   DEBUG(10,("dump_event_list:\n"));
+
+   for (te = event_ctx->timed_events; te; te = te->next) {
+
+   evt = timeval_until(&now, &te->when);
+
+   DEBUGADD(10,("Event \"%s\" %lx handled in %d seconds\n",
+  te->event_name,
+  (unsigned long)te,
+  (int)evt.tv_sec));
+   }
+}

Modified: branches/SAMBA_3_0_26/source/lib/events.c
===
--- branches/SAMBA_3_0_26/source/lib/events.c   2007-06-21 11:14:12 UTC (rev 
23561)
+++ branches/SAMBA_3_0_26/source/lib/events.c   2007-06-21 13:03:27 UTC (rev 
23562)
@@ -391,3 +391,27 @@
}
return 0;
 }
+
+void dump_event_list(struct event_context *event_ctx)
+{
+   struct timed_event *te;
+   struct timeval evt, now;
+
+   if (!event_ctx) {
+   return;
+   }
+
+   now = timeval_current();
+
+   DEBUG(10,("dump_event_list:\n"));
+
+   for (te = event_ctx->timed_events; te; te = te->next) {
+
+   evt = timeval_until(&now, &te->when);
+
+   DEBUGADD(10,("Event \"%s\" %lx handled in %d seconds\n",
+  te->event_name,
+  (unsigned long)te,
+  (int)evt.tv_sec));
+   }
+}



svn commit: samba r23564 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_26/source/nsswitch

2007-06-21 Thread gd
Author: gd
Date: 2007-06-21 13:05:56 + (Thu, 21 Jun 2007)
New Revision: 23564

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23564

Log:
Handle MSG_DUMP_EVENT_LIST only in winbindd for now.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd.c   2007-06-21 13:04:28 UTC 
(rev 23563)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd.c   2007-06-21 13:05:56 UTC 
(rev 23564)
@@ -1159,6 +1159,9 @@
messaging_register(winbind_messaging_context(), NULL,
   MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus);
 
+   messaging_register(winbind_messaging_context(), NULL,
+  MSG_DUMP_EVENT_LIST, winbind_msg_dump_event_list);
+
poptFreeContext(pc);
 
netsamlogon_cache_init(); /* Non-critical */

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2007-06-21 13:04:28 UTC 
(rev 23563)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2007-06-21 13:05:56 UTC 
(rev 23564)
@@ -698,7 +698,30 @@
}
 }
 
+void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
+void *private_data,
+uint32_t msg_type,
+struct server_id server_id,
+DATA_BLOB *data)
+{
+   struct winbindd_child *child;
 
+   DEBUG(10,("winbind_msg_dump_event_list received\n"));
+
+   dump_event_list(winbind_event_context());
+
+   for (child = children; child != NULL; child = child->next) {
+
+   DEBUG(10,("winbind_msg_dump_event_list: sending message to pid 
%u\n",
+   (unsigned int)child->pid));
+
+   messaging_send_buf(msg_ctx, pid_to_procid(child->pid),
+  MSG_DUMP_EVENT_LIST,
+  NULL, 0);
+   }
+
+}
+
 static void account_lockout_policy_handler(struct event_context *ctx,
   struct timed_event *te,
   const struct timeval *now,
@@ -885,6 +908,18 @@
talloc_destroy(mem_ctx);
 }
 
+static void child_msg_dump_event_list(struct messaging_context *msg,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
+{
+   DEBUG(5,("child_msg_dump_event_list received\n"));
+
+   dump_event_list(winbind_event_context());
+}
+
+
 static BOOL fork_domain_child(struct winbindd_child *child)
 {
int fdpair[2];
@@ -958,6 +993,8 @@
 MSG_WINBIND_ONLINE, NULL);
messaging_deregister(winbind_messaging_context(),
 MSG_WINBIND_ONLINESTATUS, NULL);
+   messaging_deregister(winbind_messaging_context(),
+MSG_DUMP_EVENT_LIST, NULL);
 
/* Handle online/offline messages. */
messaging_register(winbind_messaging_context(), NULL,
@@ -966,6 +1003,8 @@
   MSG_WINBIND_ONLINE, child_msg_online);
messaging_register(winbind_messaging_context(), NULL,
   MSG_WINBIND_ONLINESTATUS, child_msg_onlinestatus);
+   messaging_register(winbind_messaging_context(), NULL,
+  MSG_DUMP_EVENT_LIST, child_msg_dump_event_list);
 
if ( child->domain ) {
child->domain->startup = True;

Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd.c
===
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd.c2007-06-21 13:04:28 UTC 
(rev 23563)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd.c2007-06-21 13:05:56 UTC 
(rev 23564)
@@ -1120,6 +1120,9 @@
messaging_register(winbind_messaging_context(), NULL,
   MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus);
 
+   messaging_register(winbind_messaging_context(), NULL,
+  MSG_DUMP_EVENT_LIST, winbind_msg_dump_event_list);
+
poptFreeContext(pc);
 
netsamlogon_cache_init(); /* Non-critical */

Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c   2007-06-21 
13:04:28 UTC (rev 23563)
+++ branches/SAMBA_3_0_26/source/nsswitch/

svn commit: samba r23563 - in branches: SAMBA_3_0/source/include SAMBA_3_0/source/utils SAMBA_3_0_26/source/include SAMBA_3_0_26/source/utils

2007-06-21 Thread gd
Author: gd
Date: 2007-06-21 13:04:28 + (Thu, 21 Jun 2007)
New Revision: 23563

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23563

Log:
Add dump-event-list command to smbcontrol.

Guenther

Modified:
   branches/SAMBA_3_0/source/include/messages.h
   branches/SAMBA_3_0/source/utils/smbcontrol.c
   branches/SAMBA_3_0_26/source/include/messages.h
   branches/SAMBA_3_0_26/source/utils/smbcontrol.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/messages.h
===
--- branches/SAMBA_3_0/source/include/messages.h2007-06-21 13:03:27 UTC 
(rev 23562)
+++ branches/SAMBA_3_0/source/include/messages.h2007-06-21 13:04:28 UTC 
(rev 23563)
@@ -98,6 +98,9 @@
 #define MSG_WINBIND_TRY_TO_GO_ONLINE   0x0406
 #define MSG_WINBIND_FAILED_TO_GO_ONLINE 0x0407
 
+/* event messages */
+#define MSG_DUMP_EVENT_LIST0x0500
+
 /*
  * Special flags passed to message_send. Allocated from the top, lets see when
  * it collides with the message types in the lower 16 bits :-)

Modified: branches/SAMBA_3_0/source/utils/smbcontrol.c
===
--- branches/SAMBA_3_0/source/utils/smbcontrol.c2007-06-21 13:03:27 UTC 
(rev 23562)
+++ branches/SAMBA_3_0/source/utils/smbcontrol.c2007-06-21 13:04:28 UTC 
(rev 23563)
@@ -982,7 +982,23 @@
return num_replies;
 }
 
+static BOOL do_dump_event_list(struct messaging_context *msg_ctx,
+  const struct server_id pid,
+  const int argc, const char **argv)
+{
+   struct server_id myid;
 
+   myid = pid_to_procid(sys_getpid());
+
+   if (argc != 1) {
+   fprintf(stderr, "Usage: smbcontrol  dump-event-list\n");
+   return False;
+   }
+
+   return send_message(msg_ctx, pid, MSG_DUMP_EVENT_LIST, NULL, 0);
+}
+
+
 static BOOL do_reload_config(struct messaging_context *msg_ctx,
 const struct server_id pid,
 const int argc, const char **argv)
@@ -1079,6 +1095,7 @@
{ "online", do_winbind_online, "Ask winbind to go into online state"},
{ "offline", do_winbind_offline, "Ask winbind to go into offline 
state"},
{ "onlinestatus", do_winbind_onlinestatus, "Request winbind online 
status"},
+   { "dump-event-list", do_dump_event_list, "Dump event list"},
{ "noop", do_noop, "Do nothing" },
{ NULL }
 };

Modified: branches/SAMBA_3_0_26/source/include/messages.h
===
--- branches/SAMBA_3_0_26/source/include/messages.h 2007-06-21 13:03:27 UTC 
(rev 23562)
+++ branches/SAMBA_3_0_26/source/include/messages.h 2007-06-21 13:04:28 UTC 
(rev 23563)
@@ -98,6 +98,9 @@
 #define MSG_WINBIND_TRY_TO_GO_ONLINE   0x0406
 #define MSG_WINBIND_FAILED_TO_GO_ONLINE 0x0407
 
+/* event messages */
+#define MSG_DUMP_EVENT_LIST0x0500
+
 /*
  * Special flags passed to message_send. Allocated from the top, lets see when
  * it collides with the message types in the lower 16 bits :-)

Modified: branches/SAMBA_3_0_26/source/utils/smbcontrol.c
===
--- branches/SAMBA_3_0_26/source/utils/smbcontrol.c 2007-06-21 13:03:27 UTC 
(rev 23562)
+++ branches/SAMBA_3_0_26/source/utils/smbcontrol.c 2007-06-21 13:04:28 UTC 
(rev 23563)
@@ -982,7 +982,23 @@
return num_replies;
 }
 
+static BOOL do_dump_event_list(struct messaging_context *msg_ctx,
+  const struct server_id pid,
+  const int argc, const char **argv)
+{
+   struct server_id myid;
 
+   myid = pid_to_procid(sys_getpid());
+
+   if (argc != 1) {
+   fprintf(stderr, "Usage: smbcontrol  dump-event-list\n");
+   return False;
+   }
+
+   return send_message(msg_ctx, pid, MSG_DUMP_EVENT_LIST, NULL, 0);
+}
+
+
 static BOOL do_reload_config(struct messaging_context *msg_ctx,
 const struct server_id pid,
 const int argc, const char **argv)
@@ -1079,6 +1095,7 @@
{ "online", do_winbind_online, "Ask winbind to go into online state"},
{ "offline", do_winbind_offline, "Ask winbind to go into offline 
state"},
{ "onlinestatus", do_winbind_onlinestatus, "Request winbind online 
status"},
+   { "dump-event-list", do_dump_event_list, "Dump event list"},
{ "noop", do_noop, "Do nothing" },
{ NULL }
 };



svn commit: samba r23561 - in branches/SAMBA_4_0/source/torture/rpc: .

2007-06-21 Thread obnox
Author: obnox
Date: 2007-06-21 11:14:12 + (Thu, 21 Jun 2007)
New Revision: 23561

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23561

Log:
Fix an output message.


Modified:
   branches/SAMBA_4_0/source/torture/rpc/winreg.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c
===
--- branches/SAMBA_4_0/source/torture/rpc/winreg.c  2007-06-21 10:18:20 UTC 
(rev 23560)
+++ branches/SAMBA_4_0/source/torture/rpc/winreg.c  2007-06-21 11:14:12 UTC 
(rev 23561)
@@ -758,7 +758,7 @@
 
if (created && deleted && 
test_OpenKey(p, mem_ctx, &handle, TEST_KEY1, &newhandle)) {
-   printf("DeleteKey failed (OpenKey after Delete didn't work)\n");
+   printf("DeleteKey failed (OpenKey after Delete worked)\n");
ret = false;
}
 



svn commit: samba r23560 - in branches/SAMBA_4_0: source/dsdb/samdb source/dsdb/samdb/ldb_modules source/dsdb/schema source/lib source/lib/ldb/common source/lib/ldb/samba source/scripting/libjs source

2007-06-21 Thread abartlet
Author: abartlet
Date: 2007-06-21 10:18:20 + (Thu, 21 Jun 2007)
New Revision: 23560

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23560

Log:
- Activate metze's schema modules (from metze's schema-loading-13 patch).
- samba3sam.js: rework the samba3sam test to not use objectCategory, 
  as it's has special rules (dnsName a simple match)
- ldap.js: Test the ordering of the objectClass attributes for the baseDN
- schema_init.c: Load the mayContain and mustContain (and system...) attributes 
when 
  reading the schema from ldb
- To make the schema load not suck in terms of performance, write the 
  schema into a static global variable
- ldif_handlers.c: Match objectCategory for equality and canonicolisation 
  based on the loaded schema, not simple tring manipuation
- ldb_msg.c: don't duplicate attributes when adding attributes to a list
- kludge_acl.c: return allowedAttributesEffective based on schema results
  and privilages

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/kludge_acl.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema_fsmo.c
   branches/SAMBA_4_0/source/dsdb/samdb/samdb.c
   branches/SAMBA_4_0/source/dsdb/schema/schema_init.c
   branches/SAMBA_4_0/source/lib/db_wrap.c
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c
   branches/SAMBA_4_0/source/lib/ldb/samba/ldif_handlers.c
   branches/SAMBA_4_0/source/scripting/libjs/provision.js
   branches/SAMBA_4_0/source/setup/provision
   branches/SAMBA_4_0/source/setup/provision_partitions.ldif
   branches/SAMBA_4_0/source/setup/provision_schema_basedn_modify.ldif
   branches/SAMBA_4_0/testprogs/ejs/ldap.js
   branches/SAMBA_4_0/testprogs/ejs/samba3sam.js


Changeset:
Sorry, the patch is too large (1200 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23560


svn commit: samba r23559 - in branches/SAMBA_4_0/source/setup: .

2007-06-21 Thread gd
Author: gd
Date: 2007-06-21 08:52:15 + (Thu, 21 Jun 2007)
New Revision: 23559

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23559

Log:
After running testprogs/ejs/minschema.js update schema.ldif (on abartlet's
request).

Guenther

Modified:
   branches/SAMBA_4_0/source/setup/schema.ldif


Changeset:
Modified: branches/SAMBA_4_0/source/setup/schema.ldif
===
--- branches/SAMBA_4_0/source/setup/schema.ldif 2007-06-21 05:14:13 UTC (rev 
23558)
+++ branches/SAMBA_4_0/source/setup/schema.ldif 2007-06-21 08:52:15 UTC (rev 
23559)
@@ -9019,6 +9019,19 @@
 objectClass: classSchema
 subClassOf: domain
 governsID: 1.2.840.113556.1.5.67
+possibleInferiors: group
+possibleInferiors: lostAndFound
+possibleInferiors: builtinDomain
+possibleInferiors: computer
+possibleInferiors: user
+possibleInferiors: container
+possibleInferiors: groupPolicyContainer
+possibleInferiors: organization
+possibleInferiors: domainDNS
+possibleInferiors: locality
+possibleInferiors: msDS-AzAdminManager
+possibleInferiors: country
+possibleInferiors: organizationalUnit
 rDNAttID: dc
 showInAdvancedViewOnly: TRUE
 adminDisplayName: Domain-DNS
@@ -9043,6 +9056,10 @@
 objectClass: classSchema
 subClassOf: top
 governsID: 1.2.840.113556.1.5.235
+possibleInferiors: group
+possibleInferiors: container
+possibleInferiors: msDS-AzScope
+possibleInferiors: groupPolicyContainer
 rDNAttID: cn
 showInAdvancedViewOnly: TRUE
 adminDisplayName: MS-DS-Az-Application
@@ -9069,6 +9086,9 @@
 objectClass: classSchema
 subClassOf: top
 governsID: 1.2.840.113556.1.5.4
+possibleInferiors: group
+possibleInferiors: computer
+possibleInferiors: user
 rDNAttID: cn
 showInAdvancedViewOnly: TRUE
 adminDisplayName: Builtin-Domain
@@ -9112,6 +9132,10 @@
 objectClass: classSchema
 subClassOf: top
 governsID: 1.2.840.113556.1.5.12
+possibleInferiors: lostAndFound
+possibleInferiors: sitesContainer
+possibleInferiors: container
+possibleInferiors: groupPolicyContainer
 rDNAttID: cn
 showInAdvancedViewOnly: TRUE
 adminDisplayName: Configuration
@@ -9227,6 +9251,9 @@
 objectClass: classSchema
 subClassOf: top
 governsID: 1.2.840.113556.1.5.237
+possibleInferiors: group
+possibleInferiors: container
+possibleInferiors: groupPolicyContainer
 rDNAttID: cn
 showInAdvancedViewOnly: TRUE
 adminDisplayName: MS-DS-Az-Scope
@@ -9250,6 +9277,8 @@
 objectClass: classSchema
 subClassOf: top
 governsID: 2.5.6.3
+possibleInferiors: organization
+possibleInferiors: locality
 rDNAttID: l
 showInAdvancedViewOnly: TRUE
 adminDisplayName: Locality
@@ -9279,6 +9308,7 @@
 objectClass: classSchema
 subClassOf: top
 governsID: 1.2.840.113556.1.5.7000.53
+possibleInferiors: crossRef
 rDNAttID: cn
 showInAdvancedViewOnly: TRUE
 adminDisplayName: Cross-Ref-Container
@@ -9326,6 +9356,7 @@
 objectClass: classSchema
 subClassOf: top
 governsID: 1.2.840.113556.1.5.95
+possibleInferiors: subnet
 rDNAttID: cn
 showInAdvancedViewOnly: TRUE
 adminDisplayName: Subnet-Container
@@ -9482,6 +9513,9 @@
 objectClass: classSchema
 subClassOf: top
 governsID: 2.5.6.2
+possibleInferiors: organization
+possibleInferiors: locality
+possibleInferiors: organizationalUnit
 rDNAttID: c
 showInAdvancedViewOnly: TRUE
 adminDisplayName: Country
@@ -9506,6 +9540,16 @@
 objectClass: classSchema
 subClassOf: top
 governsID: 2.5.6.5
+possibleInferiors: group
+possibleInferiors: computer
+possibleInferiors: user
+possibleInferiors: container
+possibleInferiors: groupPolicyContainer
+possibleInferiors: person
+possibleInferiors: locality
+possibleInferiors: msDS-AzAdminManager
+possibleInferiors: organizationalUnit
+possibleInferiors: organizationalPerson
 rDNAttID: ou
 showInAdvancedViewOnly: TRUE
 adminDisplayName: Organizational-Unit
@@ -9561,6 +9605,38 @@
 objectClass: classSchema
 subClassOf: top
 governsID: 1.2.840.113556.1.5.139
+possibleInferiors: group
+possibleInferiors: msDS-AzApplication
+possibleInferiors: lostAndFound
+possibleInferiors: trustedDomain
+possibleInferiors: subnetContainer
+possibleInferiors: builtinDomain
+possibleInferiors: sitesContainer
+possibleInferiors: serversContainer
+possibleInferiors: attributeSchema
+possibleInferiors: classSchema
+possibleInferiors: computer
+possibleInferiors: foreignSecurityPrincipal
+possibleInferiors: user
+possibleInferiors: container
+possibleInferiors: msDS-AzScope
+possibleInferiors: groupPolicyContainer
+possibleInferiors: site
+possibleInferiors: organization
+possibleInferiors: domainDNS
+possibleInferiors: person
+possibleInferiors: queryPolicy
+possibleInferiors: locality
+possibleInferiors: subnet
+possibleInferiors: msDS-AzAdminManager
+possibleInferiors: crossRef
+possibleInferiors: displaySpecifier
+possibleInferiors: nTDSService
+possibleInferiors: country
+possibleInferiors: organizationalUnit
+possibleInferiors: secret
+possibleInferiors: organizationalPerson
+possibleInferiors: server
 rDNAttID: cn
 showInAdvancedViewOnly: TRUE
 adminDisplayName: Lost-And-