Re: svn commit: samba r22505 - in branches/SAMBA_3_0/source/rpc_server: .

2007-04-24 Thread Andrew Bartlett
On Tue, 2007-04-24 at 16:35 -0400, Jim McDonough wrote:
> On 4/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Fix build
> > -   if NT_STATUS_IS_OK(status) {
> > +   if (NT_STATUS_IS_OK(status)) {
> >
> Ummm,  uhhumm. uhhh.
> 
> Thanks.  But it really did build on my system :-)

That is expected (or at lease plausable?).  If your system does support
immediate structures, then the macro expands to something with the
appropriate ().  On other platforms, it disappears.

Andrew Bartlett

-- 
Andrew Bartletthttp://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org
Samba Developer, Red Hat Inc.  http://redhat.com



signature.asc
Description: This is a digitally signed message part


svn commit: samba r22508 - in branches/SAMBA_4_0/source/dsdb/repl: .

2007-04-24 Thread metze
Author: metze
Date: 2007-04-25 02:43:23 + (Wed, 25 Apr 2007)
New Revision: 22508

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

Log:
at option for the startup delay

metze
Modified:
   branches/SAMBA_4_0/source/dsdb/repl/drepl_service.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/repl/drepl_service.c
===
--- branches/SAMBA_4_0/source/dsdb/repl/drepl_service.c 2007-04-24 18:19:13 UTC 
(rev 22507)
+++ branches/SAMBA_4_0/source/dsdb/repl/drepl_service.c 2007-04-25 02:43:23 UTC 
(rev 22508)
@@ -116,6 +116,7 @@
 {
WERROR status;
struct dreplsrv_service *service;
+   uint32_t periodic_startup_interval;
 
switch (lp_server_role()) {
case ROLE_STANDALONE:
@@ -164,9 +165,10 @@
return;
}
 
+   periodic_startup_interval   = lp_parm_int(-1, "dreplsrv", 
"periodic_startup_interval", 15); /* in seconds */
service->periodic.interval  = lp_parm_int(-1, "dreplsrv", 
"periodic_interval", 300); /* in seconds */
 
-   status = dreplsrv_periodic_schedule(service, 
service->periodic.interval);
+   status = dreplsrv_periodic_schedule(service, periodic_startup_interval);
if (!W_ERROR_IS_OK(status)) {
task_server_terminate(task, talloc_asprintf(task,
  "dreplsrv: Failed to periodic schedule: 
%s\n",



Build status as of Wed Apr 25 00:00:02 2007

2007-04-24 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-04-24 
00:00:29.0 +
+++ /home/build/master/cache/broken_results.txt 2007-04-25 00:01:19.0 
+
@@ -1,4 +1,4 @@
-Build status as of Tue Apr 24 00:00:02 2007
+Build status as of Wed Apr 25 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
@@ -7,17 +7,17 @@
 ccache   36 6  0 
 ctdb 0  0  0 
 distcc   4  0  0 
-ldb  34 27 0 
+ldb  34 4  0 
 libreplace   32 9  0 
-lorikeet-heimdal 30 14 0 
+lorikeet-heimdal 29 14 0 
 pidl 20 6  0 
 ppp  14 0  0 
 python   0  0  0 
-rsync37 12 0 
+rsync37 13 0 
 samba0  0  0 
 samba-docs   0  0  0 
 samba-gtk3  3  0 
-samba4   38 25 5 
+samba4   38 25 4 
 samba_3_041 23 1 
 smb-build31 30 0 
 talloc   36 2  0 


Re: svn commit: samba r22505 - in branches/SAMBA_3_0/source/rpc_server: .

2007-04-24 Thread Jim McDonough

On 4/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Fix build
-   if NT_STATUS_IS_OK(status) {
+   if (NT_STATUS_IS_OK(status)) {


Ummm,  uhhumm. uhhh.

Thanks.  But it really did build on my system :-)


--
---
Jim McDonough
Samba Team
jmcd at samba dot org


svn commit: samba r22507 - in branches/SAMBA_3_0/source: . nsswitch

2007-04-24 Thread jpeach
Author: jpeach
Date: 2007-04-24 18:19:13 + (Tue, 24 Apr 2007)
New Revision: 22507

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

Log:
Wrap the method of obtaining sockets to listen on.

Added:
   branches/SAMBA_3_0/source/nsswitch/winbindd_sockinit.c
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/nsswitch/winbindd.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_util.c


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2007-04-24 18:02:23 UTC (rev 
22506)
+++ branches/SAMBA_3_0/source/Makefile.in   2007-04-24 18:19:13 UTC (rev 
22507)
@@ -811,6 +811,7 @@
 
 WINBINDD_OBJ1 = \
nsswitch/winbindd.o   \
+   nsswitch/winbindd_sockinit.o \
nsswitch/winbindd_user.o  \
nsswitch/winbindd_group.o \
nsswitch/winbindd_util.o  \

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd.c   2007-04-24 18:02:23 UTC 
(rev 22506)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd.c   2007-04-24 18:19:13 UTC 
(rev 22507)
@@ -26,7 +26,6 @@
 
 #include "includes.h"
 #include "winbindd.h"
-#include "smb_launchd.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
@@ -34,7 +33,6 @@
 BOOL opt_nocache = False;
 
 extern BOOL override_logfile;
-static BOOL unlink_winbindd_socket = True;
 
 struct event_context *winbind_event_context(void)
 {
@@ -121,15 +119,8 @@
 
 static void terminate(void)
 {
-   pstring path;
 
-   /* Remove socket file */
-   if (unlink_winbindd_socket) {
-   pstr_sprintf(path, "%s/%s",
-WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME);
-   unlink(path);
-   }
-
+   winbindd_release_sockets();
idmap_close();

trustdom_cache_shutdown();
@@ -719,43 +710,6 @@
return False;
 }
 
-static BOOL winbindd_init_sockets(int *public_sock, int *priv_sock,
-   int *idle_timeout_sec)
-{
-   struct smb_launch_info linfo;
-
-   if (smb_launchd_checkin_names(&linfo, "WinbindPublicPipe",
-   "WinbindPrivilegedPipe", NULL)) {
-   if (linfo.num_sockets != 2) {
-   DEBUG(0, ("invalid launchd configuration, "
-   "expected 2 sockets but got %d\n",
-   linfo.num_sockets));
-   return False;
-   }
-
-   *public_sock = linfo.socket_list[0];
-   *priv_sock = linfo.socket_list[1];
-   *idle_timeout_sec = linfo.idle_timeout_secs;
-
-   unlink_winbindd_socket = False;
-
-   smb_launchd_checkout(&linfo);
-   return True;
-   } else {
-   *public_sock = open_winbindd_socket();
-   *priv_sock = open_winbindd_priv_socket();
-   *idle_timeout_sec = -1;
-
-   if (*public_sock == -1 || *priv_sock == -1) {
-   DEBUG(0, ("failed to open winbindd pipes: %s\n",
-   errno ? strerror(errno) : "unknown error"));
-   return False;
-   }
-
-   return True;
-   }
-}
-
 /* Process incoming clients on listen_sock.  We use a tricky non-blocking,
non-forking, non-threaded model which allows us to handle many
simultaneous connections while remaining impervious to many denial of

Added: branches/SAMBA_3_0/source/nsswitch/winbindd_sockinit.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_sockinit.c  2007-04-24 
18:02:23 UTC (rev 22506)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_sockinit.c  2007-04-24 
18:19:13 UTC (rev 22507)
@@ -0,0 +1,127 @@
+/* 
+   Unix SMB/CIFS implementation.
+   Copyright (C) Tim Potter 2000-2001
+   Copyright (C) 2001 by Martin Pool <[EMAIL PROTECTED]>
+   Copyright (C) James Peach 2007
+   
+   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
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "includes.h"
+#include "winbindd.h"
+#include "smb_launchd.h"
+
+#undef 

svn commit: samba r22506 - in branches/SAMBA_3_0_25/source/rpc_server: .

2007-04-24 Thread ab
Author: ab
Date: 2007-04-24 18:02:23 + (Tue, 24 Apr 2007)
New Revision: 22506

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

Log:
Fix build
Modified:
   branches/SAMBA_3_0_25/source/rpc_server/srv_samr_nt.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/rpc_server/srv_samr_nt.c
===
--- branches/SAMBA_3_0_25/source/rpc_server/srv_samr_nt.c   2007-04-24 
18:01:46 UTC (rev 22505)
+++ branches/SAMBA_3_0_25/source/rpc_server/srv_samr_nt.c   2007-04-24 
18:02:23 UTC (rev 22506)
@@ -740,7 +740,7 @@
}
 
status = access_check_samr_function(acc_granted, 
SA_RIGHT_USER_SET_ATTRIBUTES, "_samr_set_sec_obj");
-   if NT_STATUS_IS_OK(status) {
+   if (NT_STATUS_IS_OK(status)) {
become_root();
status = pdb_update_sam_account(sampass);
unbecome_root();



svn commit: samba r22505 - in branches/SAMBA_3_0/source/rpc_server: .

2007-04-24 Thread ab
Author: ab
Date: 2007-04-24 18:01:46 + (Tue, 24 Apr 2007)
New Revision: 22505

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

Log:
Fix build
Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c  2007-04-24 15:56:02 UTC 
(rev 22504)
+++ branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c  2007-04-24 18:01:46 UTC 
(rev 22505)
@@ -725,7 +725,7 @@
}
 
status = access_check_samr_function(acc_granted, 
SA_RIGHT_USER_SET_ATTRIBUTES, "_samr_set_sec_obj");
-   if NT_STATUS_IS_OK(status) {
+   if (NT_STATUS_IS_OK(status)) {
become_root();
status = pdb_update_sam_account(sampass);
unbecome_root();



Rev 11999: Start converting provision to python. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 11999
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Tue 2007-04-24 14:32:08 +0200
message:
  Start converting provision to python.
added:
  source/scripting/python/   python-20070424105646-7wznb9sm6riwgd4c-1
  source/scripting/python/provision.py 
provision.py-20070424120955-t8vt1hp427dqjp2u-1
  source/scripting/python/upgrade.py 
upgrade.py-20070424123152-541ykovl4lb6s03k-1
modified:
  source/setup/provision svn-v2:[EMAIL PROTECTED]

Diff too large for email (1641 lines, the limit is 1000).


Rev 11998: Allow using system python. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 11998
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Tue 2007-04-24 12:52:53 +0200
message:
  Allow using system python.
removed:
  source/lib/python/Modules/linuxaudiodev.c 
linuxaudiodev.c-20070423105804-3mrp9flhlt8pjj8v-398
modified:
  source/build/m4/public.m4  svn-v2:[EMAIL PROTECTED]
  source/build/smb_build/makefile.pm svn-v2:[EMAIL PROTECTED]
  source/lib/ldb/libldb.m4   svn-v2:[EMAIL PROTECTED]
  source/lib/python/config.m4configure.in-20070423105804-3mrp9flhlt8pjj8v-11
  source/lib/python/config.mk
makefile.pre.in-20070423105804-3mrp9flhlt8pjj8v-5
  source/lib/tdb/libtdb.m4   svn-v2:[EMAIL PROTECTED]
  source/libcli/config.m4svn-v2:[EMAIL PROTECTED]
  source/scripting/swig/config.m4 svn-v2:[EMAIL PROTECTED]
=== removed file 'source/lib/python/Modules/linuxaudiodev.c'
--- a/source/lib/python/Modules/linuxaudiodev.c 2007-04-23 11:03:09 +
+++ b/source/lib/python/Modules/linuxaudiodev.c 1970-01-01 00:00:00 +
@@ -1,502 +0,0 @@
-/* Hey Emacs, this is -*-C-*- 
- **
- * linuxaudiodev.c -- Linux audio device for python.
- * 
- * Author  : Peter Bosch
- * Created On  : Thu Mar  2 21:10:33 2000
- * Status  : Unknown, Use with caution!
- * 
- * Unless other notices are present in any part of this file
- * explicitly claiming copyrights for other people and/or 
- * organizations, the contents of this file is fully copyright 
- * (C) 2000 Peter Bosch, all rights reserved.
- **
- */
-
-#include "Python.h"
-#include "structmember.h"
-
-#ifdef HAVE_FCNTL_H
-#include 
-#else
-#define O_RDONLY 00
-#define O_WRONLY 01
-#endif
-
-
-#include 
-#if defined(linux)
-#include 
-
-#ifndef HAVE_STDINT_H
-typedef unsigned long uint32_t;
-#endif
-
-#elif defined(__FreeBSD__)
-#include 
-
-#ifndef SNDCTL_DSP_CHANNELS
-#define SNDCTL_DSP_CHANNELS SOUND_PCM_WRITE_CHANNELS
-#endif
-
-#endif
-
-typedef struct {
-PyObject_HEAD
-intx_fd;   /* The open file */
-int x_mode;   /* file mode */
-intx_icount;   /* Input count */
-intx_ocount;   /* Output count */
-uint32_t   x_afmts;/* Audio formats supported by hardware*/
-} lad_t;
-
-/* XXX several format defined in soundcard.h are not supported,
-   including _NE (native endian) options and S32 options
-*/
-
-static struct {
-inta_bps;
-uint32_t   a_fmt;
-char   *a_name;
-} audio_types[] = {
-{  8,  AFMT_MU_LAW, "logarithmic mu-law 8-bit audio" },
-{  8,  AFMT_A_LAW,  "logarithmic A-law 8-bit audio" },
-{  8,  AFMT_U8, "linear unsigned 8-bit audio" },
-{  8,  AFMT_S8, "linear signed 8-bit audio" },
-{ 16,  AFMT_U16_BE, "linear unsigned 16-bit big-endian audio" },
-{ 16,  AFMT_U16_LE, "linear unsigned 16-bit little-endian audio" },
-{ 16,  AFMT_S16_BE, "linear signed 16-bit big-endian audio" },
-{ 16,  AFMT_S16_LE, "linear signed 16-bit little-endian audio" },
-{ 16,  AFMT_S16_NE, "linear signed 16-bit native-endian audio" },
-};
-
-static int n_audio_types = sizeof(audio_types) / sizeof(audio_types[0]);
-
-static PyTypeObject Ladtype;
-
-static PyObject *LinuxAudioError;
-
-static lad_t *
-newladobject(PyObject *arg)
-{
-lad_t *xp;
-int fd, afmts, imode;
-char *basedev = NULL;
-char *mode = NULL;
-
-/* Two ways to call linuxaudiodev.open():
- open(device, mode) (for consistency with builtin open())
- open(mode) (for backwards compatibility)
-   because the *first* argument is optional, parsing args is
-   a wee bit tricky. */
-if (!PyArg_ParseTuple(arg, "s|s:open", &basedev, &mode))
-   return NULL;
-if (mode == NULL) { /* only one arg supplied */
-   mode = basedev;
-   basedev = NULL;
-}
-
-if (strcmp(mode, "r") == 0)
-imode = O_RDONLY;
-else if (strcmp(mode, "w") == 0)
-imode = O_WRONLY;
-else {
-PyErr_SetString(LinuxAudioError, "mode should be 'r' or 'w'");
-return NULL;
-}
-
-/* Open the correct device.  The base device name comes from the
- * AUDIODEV environment variable first, then /dev/dsp.  The
- * control device tacks "ctl" onto the base device name.
- * 
- * Note that the only difference between /dev/audio and /dev/dsp
- * is that the former uses logarithmic mu-law encoding and the
- * latter uses 8-bit unsigned encoding.
- */
-
-if (basedev == NULL) {  /* called with one arg */
-   basedev = getenv("AUDIODEV");
-   if (basedev == NULL) /* $AUDIODEV no

Rev 12000: Fix some more of the python code. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 12000
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Tue 2007-04-24 15:45:31 +0200
message:
  Fix some more of the python code.
added:
  source/scripting/python/options.py 
options.py-20070424131408-l3elrc5pi4xp052b-1
modified:
  source/scripting/python/provision.py 
provision.py-20070424120955-t8vt1hp427dqjp2u-1
  source/setup/provision svn-v2:[EMAIL PROTECTED]

Diff too large for email (1799 lines, the limit is 1000).


Rev 11997: Remove more cruft. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 11997
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Tue 2007-04-24 01:19:35 +0200
message:
  Remove more cruft.
removed:
  source/lib/python/Lib/lib-tk/  libtk-20070423105804-3mrp9flhlt8pjj8v-191
  source/lib/python/Lib/lib-tk/Canvas.py 
canvas.py-20070423105804-3mrp9flhlt8pjj8v-854
  source/lib/python/Lib/lib-tk/Dialog.py 
dialog.py-20070423105804-3mrp9flhlt8pjj8v-855
  source/lib/python/Lib/lib-tk/FileDialog.py 
filedialog.py-20070423105804-3mrp9flhlt8pjj8v-856
  source/lib/python/Lib/lib-tk/FixTk.py 
fixtk.py-20070423105804-3mrp9flhlt8pjj8v-857
  source/lib/python/Lib/lib-tk/ScrolledText.py 
scrolledtext.py-20070423105804-3mrp9flhlt8pjj8v-858
  source/lib/python/Lib/lib-tk/SimpleDialog.py 
simpledialog.py-20070423105804-3mrp9flhlt8pjj8v-859
  source/lib/python/Lib/lib-tk/Tix.py tix.py-20070423105804-3mrp9flhlt8pjj8v-860
  source/lib/python/Lib/lib-tk/Tkconstants.py 
tkconstants.py-20070423105804-3mrp9flhlt8pjj8v-861
  source/lib/python/Lib/lib-tk/Tkdnd.py 
tkdnd.py-20070423105804-3mrp9flhlt8pjj8v-862
  source/lib/python/Lib/lib-tk/Tkinter.py 
tkinter.py-20070423105804-3mrp9flhlt8pjj8v-863
  source/lib/python/Lib/lib-tk/tkColorChooser.py 
tkcolorchooser.py-20070423105804-3mrp9flhlt8pjj8v-864
  source/lib/python/Lib/lib-tk/tkCommonDialog.py 
tkcommondialog.py-20070423105804-3mrp9flhlt8pjj8v-865
  source/lib/python/Lib/lib-tk/tkFileDialog.py 
tkfiledialog.py-20070423105804-3mrp9flhlt8pjj8v-866
  source/lib/python/Lib/lib-tk/tkFont.py 
tkfont.py-20070423105804-3mrp9flhlt8pjj8v-867
  source/lib/python/Lib/lib-tk/tkMessageBox.py 
tkmessagebox.py-20070423105804-3mrp9flhlt8pjj8v-868
  source/lib/python/Lib/lib-tk/tkSimpleDialog.py 
tksimpledialog.py-20070423105804-3mrp9flhlt8pjj8v-869
  source/lib/python/Lib/lib-tk/turtle.py 
turtle.py-20070423105804-3mrp9flhlt8pjj8v-870
  source/lib/python/Lib/msilib/  msilib-20070423105804-3mrp9flhlt8pjj8v-206
  source/lib/python/Lib/msilib/__init__.py 
__init__.py-20070423105804-3mrp9flhlt8pjj8v-874
  source/lib/python/Lib/msilib/schema.py 
schema.py-20070423105804-3mrp9flhlt8pjj8v-875
  source/lib/python/Lib/msilib/sequence.py 
sequence.py-20070423105804-3mrp9flhlt8pjj8v-876
  source/lib/python/Lib/msilib/text.py 
text.py-20070423105804-3mrp9flhlt8pjj8v-877
modified:
  source/lib/python/config.m4configure.in-20070423105804-3mrp9flhlt8pjj8v-11

Diff too large for email (10742 lines, the limit is 1000).


Rev 11992: Fix python build. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 11992
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Mon 2007-04-23 17:41:16 +0200
message:
  Fix python build.
removed:
  source/lib/python/pyconfig.h.in 
pyconfig.h.in-20070423105804-3mrp9flhlt8pjj8v-13
renamed:
  source/lib/python/Makefile.pre.in => source/lib/python/config.mk 
makefile.pre.in-20070423105804-3mrp9flhlt8pjj8v-5
modified:
  source/lib/basic.mksvn-v2:[EMAIL PROTECTED]
  source/lib/python/Python/sysmodule.c 
sysmodule.c-20070423105804-3mrp9flhlt8pjj8v-570
  source/lib/python/config.m4configure.in-20070423105804-3mrp9flhlt8pjj8v-11
  source/lib/python/config.mk
makefile.pre.in-20070423105804-3mrp9flhlt8pjj8v-5

Diff too large for email (2604 lines, the limit is 1000).


Rev 11995: Fix paths. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 11995
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Mon 2007-04-23 22:47:21 +0200
message:
  Fix paths.
modified:
  source/lib/python/Modules/getpath.c 
getpath.c-20070423105804-3mrp9flhlt8pjj8v-390
=== modified file 'source/lib/python/Modules/getpath.c'
--- a/source/lib/python/Modules/getpath.c   2007-04-23 11:03:09 +
+++ b/source/lib/python/Modules/getpath.c   2007-04-23 20:47:21 +
@@ -502,6 +502,7 @@
 #endif /* HAVE_READLINK */
 
 reduce(argv0_path);
+   joinpath(argv0_path, "../lib/python");
 /* At this point, argv0_path is guaranteed to be less than
MAXPATHLEN bytes long.
 */



Rev 11991: Integrate pythons' configure. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 11991
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Mon 2007-04-23 13:41:38 +0200
message:
  Integrate pythons' configure.
removed:
  source/lib/python/install-sh   installsh-20070423105804-3mrp9flhlt8pjj8v-12
renamed:
  source/lib/python/configure.in => source/lib/python/config.m4 
configure.in-20070423105804-3mrp9flhlt8pjj8v-11
modified:
  source/configure.acsvn-v2:[EMAIL PROTECTED]
  source/lib/replace/autoconf-2.60.m4 svn-v2:[EMAIL PROTECTED]
  source/lib/python/config.m4configure.in-20070423105804-3mrp9flhlt8pjj8v-11

Diff too large for email (1070 lines, the limit is 1000).


Rev 11991: Integrate pythons' configure. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 11991
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Mon 2007-04-23 13:41:38 +0200
message:
  Integrate pythons' configure.
removed:
  source/lib/python/install-sh   installsh-20070423105804-3mrp9flhlt8pjj8v-12
renamed:
  source/lib/python/configure.in => source/lib/python/config.m4 
configure.in-20070423105804-3mrp9flhlt8pjj8v-11
modified:
  source/configure.acsvn-v2:[EMAIL PROTECTED]
  source/lib/replace/autoconf-2.60.m4 svn-v2:[EMAIL PROTECTED]
  source/lib/python/config.m4configure.in-20070423105804-3mrp9flhlt8pjj8v-11

Diff too large for email (1070 lines, the limit is 1000).


Rev 11177: Add hive operations. in file:///home/jelmer/bzr.samba/4.0-regwrite/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/4.0-regwrite/


revno: 11177
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: 4.0-regwrite
timestamp: Mon 2007-04-23 16:05:39 +0200
message:
  Add hive operations.
added:
  source/lib/registry/hive.h hive.h-20070423140448-w1nvzs8d2qxvyswz-1
modified:
  source/lib/registry/config.mk  svn-v2:[EMAIL PROTECTED]
  source/lib/registry/registry.h svn-v2:[EMAIL PROTECTED]
=== added file 'source/lib/registry/hive.h'
--- a/source/lib/registry/hive.h1970-01-01 00:00:00 +
+++ b/source/lib/registry/hive.h2007-04-23 14:05:39 +
@@ -0,0 +1,59 @@
+/* 
+   Unix SMB/CIFS implementation.
+   Registry hive interface
+   Copyright (C) Jelmer Vernooij 
2003-2007.
+   
+   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
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef __REGISTRY_HIVE_H__
+#define __REGISTRY_HIVE_H__
+
+struct hive_context {
+   const struct hive_operations *ops;
+};
+
+struct hive_key {
+   struct hive_context *context;
+
+};
+
+struct hive_operations {
+   const char *name;   
+
+   WERROR (*open_root) (struct hive_context *hive, struct hive_key **key);
+   
+   WERROR (*enum_key) (struct hive_key *key, int idx, struct hive_key 
**key);
+   WERROR (*get_key_by_name) (struct hive_key *key, const char *name, 
struct hive_key **key);
+   
+   WERROR (*add_key) (struct hive_key *key, const char *name, uint32_t 
access_mask, 
+  struct security_descriptor *desc, 
struct hive_key **key);
+   WERROR (*del_key) (struct hive_key *key, const char *name);
+   WERROR (*flush_key) (struct hive_key *key);
+
+   /* Value */
+   WERROR (*enum_value) (struct hive_key *key, int idx, uint32_t *type, 
DATA_BLOB *data);
+   WERROR (*get_value_by_name) (struct hive_key *key, const char *name, 
uint32_t *type, 
+DATA_BLOB 
*data);
+   WERROR (*set_value) (struct hive_key *key, const char *name, uint32_t 
type, DATA_BLOB data);
+
+   /* Security Descriptors */
+   WERROR (*set_sec_desc) (struct hive_key *key, struct 
security_descriptor *desc);
+   WERROR (*set_get_desc) (struct hive_key *key, struct 
security_descriptor **desc);
+};
+
+struct hive_context *hive_load(TALLOC_CTX *ctx, const char *filename);
+
+#endif /* __REGISTRY_HIVE_H__ */

=== modified file 'source/lib/registry/config.mk'
--- a/source/lib/registry/config.mk 2007-04-18 17:05:02 +
+++ b/source/lib/registry/config.mk 2007-04-23 14:05:39 +
@@ -33,13 +33,8 @@
dir.o \
rpc.o
 PUBLIC_DEPENDENCIES = \
-<<< TREE
LIBSAMBA-UTIL CHARSET TDR_REGF ldb \
RPC_NDR_WINREG
-PRIVATE_PROTO_HEADER = registry_proto.h
-===
-   LIBSAMBA-UTIL CHARSET
->>> MERGE-SOURCE
 PUBLIC_HEADERS = registry.h
 # End MODULE registry_ldb
 

=== modified file 'source/lib/registry/registry.h'
--- a/source/lib/registry/registry.h2007-04-18 17:05:02 +
+++ b/source/lib/registry/registry.h2007-04-23 14:05:39 +
@@ -57,6 +57,10 @@
 
 #define REGISTRY_INTERFACE_VERSION 1
 
+struct reg_key_path {
+   const char **elements;
+};
+
 struct reg_key_operations;
 
 /* structure to store the registry handles */
@@ -82,55 +86,6 @@
 typedef void (*reg_key_notification_function) (void);
 typedef void (*reg_value_notification_function) (void);
 
-/* 
- * Container for function pointers to enumeration routines
- * for virtual registry view 
- *
- * Backends provide just one hive (example: regf, creg)
- * 
- * Backends should always do case-insensitive compares 
- * (everything is case-insensitive but case-preserving, 
- * just like the FS)
- *
- * There is no save function as all operations are expected to 
- * be atomic.
- */ 
-
-struct reg_key_operations {
-   const char *name;
-
-   /* Or this function or get_subkey_by_name() */
-   WERROR (*open_key) (TALLOC_CTX *, const struct registry_key *, const 
char *name, struct registry_key **);
-
-   WERROR (*num_subkeys) (const struct registry_key *, uint32_t *count);
-   WERROR

Rev 11178: Merge upstream. in file:///home/jelmer/bzr.samba/4.0-regwrite/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/4.0-regwrite/


revno: 11178
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: 4.0-regwrite
timestamp: Mon 2007-04-23 16:16:35 +0200
message:
  Merge upstream.
added:
  source/cluster/ctdb/common/cmdline.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/common/ctdb_lockwait.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/include/cmdline.h svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/lockwait.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tools/ svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tools/ctdb_status.c svn-v2:[EMAIL PROTECTED]
  source/dsdb/repl/drepl_out_helpers.c svn-v2:[EMAIL PROTECTED]
  source/dsdb/repl/drepl_out_helpers.h svn-v2:[EMAIL PROTECTED]
  source/dsdb/repl/drepl_out_pull.c svn-v2:[EMAIL PROTECTED]
  source/dsdb/repl/drepl_partitions.c svn-v2:[EMAIL PROTECTED]
  source/dsdb/repl/drepl_periodic.c svn-v2:[EMAIL PROTECTED]
  source/heimdal_build/vis.h svn-v2:[EMAIL PROTECTED]
  source/lib/util/become_daemon.c svn-v2:[EMAIL PROTECTED]
  source/setup/provision_configuration_basedn.ldif svn-v2:[EMAIL PROTECTED]
  source/setup/provision_configuration_basedn_modify.ldif svn-v2:[EMAIL 
PROTECTED]
  source/setup/provision_schema_basedn.ldif svn-v2:[EMAIL PROTECTED]
  source/setup/provision_schema_basedn_modify.ldif svn-v2:[EMAIL PROTECTED]
modified:
  source/auth/auth_util.csvn-v2:[EMAIL PROTECTED]
  source/auth/config.mk  svn-v2:[EMAIL PROTECTED]
  source/auth/credentials/credentials_krb5.h svn-v2:[EMAIL PROTECTED]
  source/auth/gensec/config.mk   svn-v2:[EMAIL PROTECTED]
  source/auth/ntlmssp/config.mk  svn-v2:[EMAIL PROTECTED]
  source/autogen.sh  svn-v2:[EMAIL PROTECTED]
  source/build/smb_build/cflags.pm svn-v2:[EMAIL PROTECTED]
  source/build/smb_build/config_mk.pm svn-v2:[EMAIL PROTECTED]
  source/build/smb_build/input.pm svn-v2:[EMAIL PROTECTED]
  source/build/smb_build/makefile.pm svn-v2:[EMAIL PROTECTED]
  source/build/smb_build/output.pm svn-v2:[EMAIL PROTECTED]
  source/cldap_server/config.mk  svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/Makefile.in svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/brlock_ctdb.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/common/ctdb.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/common/ctdb_call.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/common/ctdb_client.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/common/ctdb_daemon.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/common/ctdb_ltdb.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/common/ctdb_message.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/common/ctdb_util.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/config.mk  svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/ctdb_cluster.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/direct/ctdbd.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/direct/ctdbd.sh svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/direct/ctdbd_test.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/ib/ibw_ctdb_init.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/include/ctdb.h svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/include/ctdb_private.h svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/include/includes.h svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/opendb_ctdb.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tcp/tcp_connect.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tcp/tcp_init.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/bench.sh svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/bench1.sh svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/ctdb_bench.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/ctdb_fetch.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/ctdb_fetch1.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/ctdb_messaging.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/ctdb_test.c svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/fetch.sh svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/fetch1.sh svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/messaging.sh svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/test.sh svn-v2:[EMAIL PROTECTED]
  source/cluster/ctdb/tests/test1.sh svn-v2:[EMAIL PROTECTED]
  source/dsdb/config.mk  svn-v2:[EMAIL PROTECTED]
  source/dsdb/repl/drepl_service.c svn-v2:[EMAIL PROTECTED]
  source/dsdb/repl/drepl_service.h svn-v2:[EMAIL PROTECTED]
  source/dsdb/samdb/ldb_modules/config.mk svn-v2:[EMAIL PROTECTED]
  source/dsdb/samdb/ldb_modules/entryUUID.c svn-v2:[EMAIL PROTECTED]
  source/heimdal_build/asn1_deps.pl svn-v2:[EMAIL PROTECTED]
  source/heimdal_build/config.mk svn-v2:[EMAIL PROTECTED]
  source/heimdal_build/roken.h   svn-v2:[EMAIL PROTECTED]
  source/kdc/config.mk   svn-v2:[EMAIL PROTECTED]
  source/ldap_server/config.mk   svn-v2:[EMAIL PROTECTED]
  source/lib/cmdline/popt_credentials.c svn-v2:[EMAIL PR

Rev 12000: Add support for dgram to socket_ipv6. No tests yet... in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 12000
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: SAMBA_4_0
timestamp: Tue 2007-04-24 16:47:45 +0200
message:
  Add support for dgram to socket_ipv6. No tests yet...
modified:
  source/lib/socket/socket_ipv6.c svn-v2:[EMAIL PROTECTED]
=== modified file 'source/lib/socket/socket_ipv6.c'
--- a/source/lib/socket/socket_ipv6.c   2007-04-23 15:32:47 +
+++ b/source/lib/socket/socket_ipv6.c   2007-04-24 14:47:45 +
@@ -190,6 +190,11 @@
struct sockaddr_in cli_addr;
socklen_t cli_addr_len = sizeof(cli_addr);
int new_fd;
+   
+   if (sock->type != SOCKET_TYPE_STREAM) {
+   return NT_STATUS_INVALID_PARAMETER;
+   }
+
 
new_fd = accept(sock->fd, (struct sockaddr *)&cli_addr, &cli_addr_len);
if (new_fd == -1) {
@@ -249,6 +254,62 @@
return NT_STATUS_OK;
 }
 
+static NTSTATUS ipv6_recvfrom(struct socket_context *sock, void *buf, 
+ size_t wantlen, size_t *nread, 
+ TALLOC_CTX *addr_ctx, struct socket_address 
**_src)
+{
+   ssize_t gotlen;
+   struct sockaddr_in6 *from_addr;
+   socklen_t from_len = sizeof(*from_addr);
+   struct socket_address *src;
+   struct hostent *he;
+   
+   src = talloc(addr_ctx, struct socket_address);
+   if (!src) {
+   return NT_STATUS_NO_MEMORY;
+   }
+   
+   src->family = sock->backend_name;
+
+   from_addr = talloc(src, struct sockaddr_in6);
+   if (!from_addr) {
+   talloc_free(src);
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   src->sockaddr = (struct sockaddr *)from_addr;
+
+   *nread = 0;
+
+   gotlen = recvfrom(sock->fd, buf, wantlen, 0, 
+ src->sockaddr, &from_len);
+   if (gotlen == 0) {
+   talloc_free(src);
+   return NT_STATUS_END_OF_FILE;
+   } else if (gotlen == -1) {
+   talloc_free(src);
+   return map_nt_error_from_unix(errno);
+   }
+
+   src->sockaddrlen = from_len;
+
+   he = gethostbyaddr((void *)&from_addr->sin6_addr, 
sizeof(from_addr->sin6_addr), AF_INET6);
+   if (he == NULL) {
+   talloc_free(src);
+   return NT_STATUS_INTERNAL_ERROR;
+   }
+   src->addr = talloc_strdup(src, he->h_name);
+   if (src->addr == NULL) {
+   talloc_free(src);
+   return NT_STATUS_NO_MEMORY;
+   }
+   src->port = ntohs(from_addr->sin6_port);
+
+   *nread  = gotlen;
+   *_src   = src;
+   return NT_STATUS_OK;
+}
+
 static NTSTATUS ipv6_tcp_send(struct socket_context *sock, 
  const DATA_BLOB *blob, size_t *sendlen)
 {
@@ -266,6 +327,42 @@
return NT_STATUS_OK;
 }
 
+static NTSTATUS ipv6_sendto(struct socket_context *sock, 
+   const DATA_BLOB *blob, size_t *sendlen, 
+   const struct socket_address *dest_addr)
+{
+   ssize_t len;
+
+   if (dest_addr->sockaddr) {
+   len = sendto(sock->fd, blob->data, blob->length, 0, 
+dest_addr->sockaddr, dest_addr->sockaddrlen);
+   } else {
+   struct sockaddr_in6 srv_addr;
+   struct in6_addr addr;
+   
+   ZERO_STRUCT(srv_addr);
+   addr = interpret_addr6(dest_addr->addr);
+   if (addr.s6_addr == 0) {
+   return NT_STATUS_HOST_UNREACHABLE;
+   }
+   srv_addr.sin6_addr = addr;
+   srv_addr.sin6_port= htons(dest_addr->port);
+   srv_addr.sin6_family  = PF_INET6;
+   
+   *sendlen = 0;
+   
+   len = sendto(sock->fd, blob->data, blob->length, 0, 
+(struct sockaddr *)&srv_addr, sizeof(srv_addr));
+   }
+   if (len == -1) {
+   return map_nt_error_from_unix(errno);
+   }   
+
+   *sendlen = len;
+
+   return NT_STATUS_OK;
+}
+
 static NTSTATUS ipv6_tcp_set_option(struct socket_context *sock, const char 
*option, const char *val)
 {
set_socket_options(sock->fd, option);
@@ -410,6 +507,8 @@
.fn_listen  = ipv6_tcp_listen,
.fn_accept  = ipv6_tcp_accept,
.fn_recv= ipv6_tcp_recv,
+   .fn_recvfrom= ipv6_recvfrom,
+   .fn_sendto  = ipv6_sendto,
.fn_send= ipv6_tcp_send,
.fn_close   = ipv6_tcp_close,
.fn_pending = ipv6_pending,
@@ -425,8 +524,5 @@
 
 const struct socket_ops *socket_ipv6_ops(enum socket_type type)
 {
-   if (type != SOCKET_TYPE_STREAM) {
-   return NULL;
-   }
  

Rev 11996: Remove some more cruft. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 11996
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Tue 2007-04-24 00:48:27 +0200
message:
  Remove some more cruft.
modified:
  source/lib/python/config.m4configure.in-20070423105804-3mrp9flhlt8pjj8v-11
  source/lib/python/config.mk
makefile.pre.in-20070423105804-3mrp9flhlt8pjj8v-5
=== modified file 'source/lib/python/config.m4'
--- a/source/lib/python/config.m4   2007-04-23 20:38:05 +
+++ b/source/lib/python/config.m4   2007-04-23 22:48:27 +
@@ -31,464 +31,6 @@
 # them.
 AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library 
features])
 
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
-# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
-AC_DEFINE(_BSD_TYPES, 1, [Define on Irix to enable u_int])
-
-define_xopen_source=yes
-
-# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
-# disable features if it is defined, without any means to access these
-# features as extensions. For these systems, we skip the definition of
-# _XOPEN_SOURCE. Before adding a system to the list to gain access to
-# some feature, make sure there is no alternative way to access this
-# feature. Also, when using wildcards, make sure you have verified the
-# need for not defining _XOPEN_SOURCE on all systems matching the
-# wildcard, and that the wildcard does not include future systems
-# (which may remove their limitations).
-dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
-case $ac_sys_system/$ac_sys_release in
-  # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
-  # even though select is a POSIX function. Reported by J. Ribbens.
-  # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
-  OpenBSD/2.* | OpenBSD/3.@<:@0123456789@:>@ | OpenBSD/4.@<:@0@:>@) 
-define_xopen_source=no;;
-  # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
-  # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
-  # Marc Recht
-  NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
-define_xopen_source=no;;
-  # On Solaris 2.6, sys/wait.h is inconsistent in the usage
-  # of union __?sigval. Reported by Stuart Bishop.
-  SunOS/5.6)
-define_xopen_source=no;;
-  # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
-  # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
-  # Reconfirmed for 7.1.4 by Martin v. Loewis.
-  OpenUNIX/8.0.0| UnixWare/7.1.@<:@0-4@:>@)
-define_xopen_source=no;;
-  # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
-  # but used in struct sockaddr.sa_family. Reported by Tim Rice.
-  SCO_SV/3.2)
-define_xopen_source=no;;
-  # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
-  # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
-  # this is fixed in 10.3, which identifies itself as Darwin/7.*
-  # This should hopefully be fixed in FreeBSD 4.9
-  FreeBSD/4.8* | Darwin/6* )
-define_xopen_source=no;;
-  # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
-  # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
-  # or has another value. By not (re)defining it, the defaults come in place.
-  AIX/4)
-define_xopen_source=no;;
-  AIX/5)
-if test `uname -r` -eq 1; then
-  define_xopen_source=no
-fi
-;;
-  # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
-  # disables platform specific features beyond repair.
-  # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE 
-  # has no effect, don't bother defining them
-  Darwin/@<:@789@:>@.*)
-define_xopen_source=no
-;;
-
-esac
-
-if test $define_xopen_source = yes
-then
-  # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
-  # defined precisely as g++ defines it
-  # Furthermore, on Solaris 10, XPG6 requires the use of a C99
-  # compiler
-  case $ac_sys_system/$ac_sys_release in
-SunOS/5.8|SunOS/5.9|SunOS/5.10)
-  AC_DEFINE(_XOPEN_SOURCE, 500, 
-Define to the level of X/Open that your system supports)
-  ;;
-*)
-  AC_DEFINE(_XOPEN_SOURCE, 600, 
-Define to the level of X/Open that your system supports)
-  ;;
-  esac
-
-  # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
-  # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
-  # several APIs are not declared. Since this is also needed in some
-  # cases for HP-UX, we define it globally.
-  # except for Solaris 10, where it must not be defined, 
-  # as it implies XPG4.2
-  case $ac_sys_system/$ac_sys_release in
-SunOS/5.10)
-  ;;
-*)
-  AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1,
-   Define to activate Unix95-and-earlier features)
-  ;;
-  esac
-
-  AC_DEFINE(_PO

Rev 11994: Clean up some more files, fix the build. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 11994
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Mon 2007-04-23 22:38:05 +0200
message:
  Clean up some more files, fix the build.
removed:
  source/lib/python/Lib/bsddb/   bsddb-20070423105804-3mrp9flhlt8pjj8v-128
  source/lib/python/Lib/bsddb/__init__.py 
__init__.py-20070423105804-3mrp9flhlt8pjj8v-585
  source/lib/python/Lib/bsddb/db.py db.py-20070423105804-3mrp9flhlt8pjj8v-586
  source/lib/python/Lib/bsddb/dbobj.py 
dbobj.py-20070423105804-3mrp9flhlt8pjj8v-587
  source/lib/python/Lib/bsddb/dbrecio.py 
dbrecio.py-20070423105804-3mrp9flhlt8pjj8v-588
  source/lib/python/Lib/bsddb/dbshelve.py 
dbshelve.py-20070423105804-3mrp9flhlt8pjj8v-589
  source/lib/python/Lib/bsddb/dbtables.py 
dbtables.py-20070423105804-3mrp9flhlt8pjj8v-590
  source/lib/python/Lib/bsddb/dbutils.py 
dbutils.py-20070423105804-3mrp9flhlt8pjj8v-591
  source/lib/python/Lib/bsddb/test/ test-20070423105804-3mrp9flhlt8pjj8v-592
  source/lib/python/Lib/bsddb/test/__init__.py 
__init__.py-20070423105804-3mrp9flhlt8pjj8v-1118
  source/lib/python/Lib/bsddb/test/test_1413192.py 
test_1413192.py-20070423105804-3mrp9flhlt8pjj8v-1119
  source/lib/python/Lib/bsddb/test/test_all.py 
test_all.py-20070423105804-3mrp9flhlt8pjj8v-1120
  source/lib/python/Lib/bsddb/test/test_associate.py 
test_associate.py-20070423105804-3mrp9flhlt8pjj8v-1121
  source/lib/python/Lib/bsddb/test/test_basics.py 
test_basics.py-20070423105804-3mrp9flhlt8pjj8v-1122
  source/lib/python/Lib/bsddb/test/test_compare.py 
test_compare.py-20070423105804-3mrp9flhlt8pjj8v-1123
  source/lib/python/Lib/bsddb/test/test_compat.py 
test_compat.py-20070423105804-3mrp9flhlt8pjj8v-1124
  source/lib/python/Lib/bsddb/test/test_cursor_pget_bug.py 
test_cursor_pget_bug-20070423105804-3mrp9flhlt8pjj8v-1125
  source/lib/python/Lib/bsddb/test/test_dbobj.py 
test_dbobj.py-20070423105804-3mrp9flhlt8pjj8v-1126
  source/lib/python/Lib/bsddb/test/test_dbshelve.py 
test_dbshelve.py-20070423105804-3mrp9flhlt8pjj8v-1127
  source/lib/python/Lib/bsddb/test/test_dbtables.py 
test_dbtables.py-20070423105804-3mrp9flhlt8pjj8v-1128
  source/lib/python/Lib/bsddb/test/test_env_close.py 
test_env_close.py-20070423105804-3mrp9flhlt8pjj8v-1129
  source/lib/python/Lib/bsddb/test/test_get_none.py 
test_get_none.py-20070423105804-3mrp9flhlt8pjj8v-1130
  source/lib/python/Lib/bsddb/test/test_join.py 
test_join.py-20070423105804-3mrp9flhlt8pjj8v-1131
  source/lib/python/Lib/bsddb/test/test_lock.py 
test_lock.py-20070423105804-3mrp9flhlt8pjj8v-1132
  source/lib/python/Lib/bsddb/test/test_misc.py 
test_misc.py-20070423105804-3mrp9flhlt8pjj8v-1133
  source/lib/python/Lib/bsddb/test/test_pickle.py 
test_pickle.py-20070423105804-3mrp9flhlt8pjj8v-1134
  source/lib/python/Lib/bsddb/test/test_queue.py 
test_queue.py-20070423105804-3mrp9flhlt8pjj8v-1135
  source/lib/python/Lib/bsddb/test/test_recno.py 
test_recno.py-20070423105804-3mrp9flhlt8pjj8v-1136
  source/lib/python/Lib/bsddb/test/test_sequence.py 
test_sequence.py-20070423105804-3mrp9flhlt8pjj8v-1137
  source/lib/python/Lib/bsddb/test/test_thread.py 
test_thread.py-20070423105804-3mrp9flhlt8pjj8v-1138
  source/lib/python/Lib/ctypes/test/ test-20070423105804-3mrp9flhlt8pjj8v-607
  source/lib/python/Lib/ctypes/test/__init__.py 
__init__.py-20070423105804-3mrp9flhlt8pjj8v-1146
  source/lib/python/Lib/ctypes/test/runtests.py 
runtests.py-20070423105804-3mrp9flhlt8pjj8v-1147
  source/lib/python/Lib/ctypes/test/test_anon.py 
test_anon.py-20070423105804-3mrp9flhlt8pjj8v-1148
  source/lib/python/Lib/ctypes/test/test_array_in_pointer.py 
test_array_in_pointe-20070423105804-3mrp9flhlt8pjj8v-1149
  source/lib/python/Lib/ctypes/test/test_arrays.py 
test_arrays.py-20070423105804-3mrp9flhlt8pjj8v-1150
  source/lib/python/Lib/ctypes/test/test_as_parameter.py 
test_as_parameter.py-20070423105804-3mrp9flhlt8pjj8v-1151
  source/lib/python/Lib/ctypes/test/test_bitfields.py 
test_bitfields.py-20070423105804-3mrp9flhlt8pjj8v-1152
  source/lib/python/Lib/ctypes/test/test_buffers.py 
test_buffers.py-20070423105804-3mrp9flhlt8pjj8v-1153
  source/lib/python/Lib/ctypes/test/test_byteswap.py 
test_byteswap.py-20070423105804-3mrp9flhlt8pjj8v-1154
  source/lib/python/Lib/ctypes/test/test_callbacks.py 
test_callbacks.py-20070423105804-3mrp9flhlt8pjj8v-1155
  source/lib/python/Lib/ctypes/test/test_cast.py 
test_cast.py-20070423105804-3mrp9flhlt8pjj8v-1156
  source/lib/python/Lib/ctypes/test/test_cfuncs.py 
test_cfuncs.py-20070423105804-3mrp9flhlt8pjj8v-1157
  source/lib/python/Lib/ctypes/test/test_checkretval.py 
test_checkretval.py-20070423105804-3mrp9flhlt8pjj8v-1158
  source/lib/python/Lib/ctypes/test/test_errcheck.py 
test_errcheck.py-20070423105804-3mrp9flhlt8pjj8v-1159
  source/lib/python/Lib/ctypes/test/test_find.py 
test_find.py-20070423105804-3mrp9flhlt8pjj8v-1160
  source/lib/python/Lib/ctypes/test/t

Rev 11993: Hopefully fix ipv6. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/SAMBA_4_0/


revno: 11993
revision-id: [EMAIL PROTECTED]
parent: svn-v2:[EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: SAMBA_4_0
timestamp: Mon 2007-04-23 18:22:14 +0200
message:
  Hopefully fix ipv6.
modified:
  source/lib/socket/socket_ipv6.c svn-v2:[EMAIL PROTECTED]
=== modified file 'source/lib/socket/socket_ipv6.c'
--- a/source/lib/socket/socket_ipv6.c   2006-09-10 10:00:42 +
+++ b/source/lib/socket/socket_ipv6.c   2007-04-23 16:22:14 +
@@ -166,9 +166,11 @@
return map_nt_error_from_unix(errno);
}
 
-   ret = listen(sock->fd, queue_size);
-   if (ret == -1) {
-   return map_nt_error_from_unix(errno);
+   if (sock->type == SOCKET_TYPE_STREAM) {
+   ret = listen(sock->fd, queue_size);
+   if (ret == -1) {
+   return map_nt_error_from_unix(errno);
+   }
}
 
if (!(flags & SOCKET_FLAG_BLOCK)) {
@@ -390,6 +392,16 @@
return sock->fd;
 }
 
+static NTSTATUS ipv6_pending(struct socket_context *sock, size_t *npending)
+{
+   int value = 0;
+   if (ioctl(sock->fd, FIONREAD, &value) == 0) {
+   *npending = value;
+   return NT_STATUS_OK;
+   }
+   return map_nt_error_from_unix(errno);
+}
+
 static const struct socket_ops ipv6_tcp_ops = {
.name   = "ipv6",
.fn_init= ipv6_tcp_init,
@@ -400,6 +412,7 @@
.fn_recv= ipv6_tcp_recv,
.fn_send= ipv6_tcp_send,
.fn_close   = ipv6_tcp_close,
+   .fn_pending = ipv6_pending,
 
.fn_set_option  = ipv6_tcp_set_option,
 



Rev 12001: Revive tim's swig code. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 12001
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Tue 2007-04-24 17:41:33 +0200
message:
  Revive tim's swig code.
removed:
  source/libcli/config.m4svn-v2:[EMAIL PROTECTED]
  source/scripting/swig/config.m4 svn-v2:[EMAIL PROTECTED]
modified:
  .bzrignore svn-v2:[EMAIL PROTECTED]
  source/build/smb_build/config_mk.pm svn-v2:[EMAIL PROTECTED]
  source/build/smb_build/input.pm svn-v2:[EMAIL PROTECTED]
  source/build/smb_build/main.pl svn-v2:[EMAIL PROTECTED]
  source/configure.acsvn-v2:[EMAIL PROTECTED]
  source/lib/ldb/config.mk   svn-v2:[EMAIL PROTECTED]
  source/lib/ldb/libldb.m4   svn-v2:[EMAIL PROTECTED]
  source/lib/ldb/swig/ldb.i  svn-v2:[EMAIL PROTECTED]
  source/lib/python/config.m4configure.in-20070423105804-3mrp9flhlt8pjj8v-11
  source/lib/tdb/config.mk   svn-v2:[EMAIL PROTECTED]
  source/libcli/config.mksvn-v2:[EMAIL PROTECTED]
  source/scripting/swig/config.mk svn-v2:[EMAIL PROTECTED]
=== removed file 'source/libcli/config.m4'
--- a/source/libcli/config.m4   2007-04-24 10:52:53 +
+++ b/source/libcli/config.m4   1970-01-01 00:00:00 +
@@ -1,3 +0,0 @@
-AC_MSG_CHECKING([for Python (libcli_nbt)])
-
-SMB_ENABLE(swig_libcli_nbt, NO)

=== removed file 'source/scripting/swig/config.m4'
--- a/source/scripting/swig/config.m4   2007-04-24 10:52:53 +
+++ b/source/scripting/swig/config.m4   1970-01-01 00:00:00 +
@@ -1,6 +0,0 @@
-dnl # Scripting subsystem
-
-# Check for python support
-
-SMB_ENABLE(swig_dcerpc, NO)
-

=== modified file '.bzrignore'
--- a/.bzrignore2007-04-23 17:05:15 +
+++ b/.bzrignore2007-04-24 15:41:33 +
@@ -176,3 +176,5 @@
 source/lib/python/Modules/Setup.local
 source/lib/python/Modules/Setup
 source/lib/python/Modules/Setup.config
+lib/ldb/swig/ldb.py
+source/lib/ldb/swig/ldb.py

=== modified file 'source/build/smb_build/config_mk.pm'
--- a/source/build/smb_build/config_mk.pm   2007-04-22 10:37:51 +
+++ b/source/build/smb_build/config_mk.pm   2007-04-24 15:41:33 +
@@ -19,6 +19,12 @@
"CPPFLAGS"  => "list",
"LDFLAGS"   => "list",
},
+   "SWIG" => {
+   SWIG_FILE => "string",
+   "PRIVATE_DEPENDENCIES"  => "list",
+   "PUBLIC_DEPENDENCIES"   => "list",
+   "ENABLE"=> "bool",
+   },
"SUBSYSTEM" => {
"OBJ_FILES" => "list",
 

=== modified file 'source/build/smb_build/input.pm'
--- a/source/build/smb_build/input.pm   2007-04-22 11:40:11 +
+++ b/source/build/smb_build/input.pm   2007-04-24 15:41:33 +
@@ -8,6 +8,7 @@
 use smb_build::config;
 use strict;
 package smb_build::input;
+use File::Basename;
 
 my $srcdir = $config::config{srcdir};
 
@@ -130,6 +131,22 @@
add_libreplace($lib);
 }
 
+sub check_swig($$)
+{
+   my ($INPUT, $swig) = @_;
+
+   return if ($swig->{ENABLE} ne "YES");
+   
+   my $dirname = dirname($swig->{SWIG_FILE});
+   my $basename = basename($swig->{SWIG_FILE}, ".i");
+
+   $swig->{OUTPUT_TYPE} = ["SHARED_LIBRARY"];
+   $swig->{LIBRARY_REALNAME} = "$dirname/_$basename.\$(SHLIBEXT)";
+   $swig->{OBJ_FILES} = ["$dirname/$basename\_wrap\.o"];
+
+   check_library($INPUT, $swig, ["SHARED_LIBRARY"]);
+}
+
 sub check_binary($$)
 {
my ($INPUT, $bin) = @_;
@@ -230,10 +247,20 @@
$part->{LINK_FLAGS} = [];
$part->{FULL_OBJ_LIST} = 
["\$($part->{TYPE}_$part->{NAME}_OBJ_LIST)"];
 
-   check_subsystem($INPUT, $part, $subsys_ot) if ($part->{TYPE} eq 
"SUBSYSTEM");
-   check_module($INPUT, $part, $module_ot) if ($part->{TYPE} eq 
"MODULE");
-   check_library($INPUT, $part, $lib_ot) if ($part->{TYPE} eq 
"LIBRARY");
-   check_binary($INPUT, $part) if ($part->{TYPE} eq "BINARY");
+   if ($part->{TYPE} eq "SUBSYSTEM") { 
+   check_subsystem($INPUT, $part, $subsys_ot);
+   } elsif ($part->{TYPE} eq "MODULE") {
+   check_module($INPUT, $part, $module_ot);
+   } elsif ($part->{TYPE} eq "LIBRARY") {
+   check_library($INPUT, $part, $lib_ot);
+   } elsif ($part->{TYPE} eq "BINARY") {
+   check_binary($INPUT, $part);
+   } elsif ($part->{TYPE} eq "SWIG") {
+   check_swig($INPUT, $part);
+   } elsif ($part->{TYPE} eq "EXT_LIB") {
+   } else {
+   die("Unknown type $part->{TYPE}");
+   }
}
 
foreach my $part (values %$INPUT) {

=== modified file 'source/build/smb_build/main.pl'
--- a/source/build/smb_build/main.pl2007-04-02 17:11:36 +

Rev 11993: Some more changes to the python build, add bzrignore. in file:///home/jelmer/bzr.samba/python/

2007-04-24 Thread Jelmer Vernooij
At file:///home/jelmer/bzr.samba/python/


revno: 11993
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Jelmer Vernooij <[EMAIL PROTECTED]>
branch nick: python
timestamp: Mon 2007-04-23 19:05:15 +0200
message:
  Some more changes to the python build, add bzrignore.
added:
  source/lib/python/pyconfig.h   pyconfig.h-20070423170404-kdpuudzcur4d2s4j-1
modified:
  .bzrignore svn-v2:[EMAIL PROTECTED]
  source/lib/python/config.m4configure.in-20070423105804-3mrp9flhlt8pjj8v-11
=== added file 'source/lib/python/pyconfig.h'
--- a/source/lib/python/pyconfig.h  1970-01-01 00:00:00 +
+++ b/source/lib/python/pyconfig.h  2007-04-23 17:05:15 +
@@ -0,0 +1,1 @@
+#include "config.h"

=== modified file '.bzrignore'
--- a/.bzrignore2007-03-13 21:00:27 +
+++ b/.bzrignore2007-04-23 17:05:15 +
@@ -171,3 +171,8 @@
 source/bin/modules/*
 source/tests
 source/torture/unix/proto.h
+source/lib/python/Modules/config.c
+source/lib/python/Modules/Setup.local
+source/lib/python/Modules/Setup.local
+source/lib/python/Modules/Setup
+source/lib/python/Modules/Setup.config

=== modified file 'source/lib/python/config.m4'
--- a/source/lib/python/config.m4   2007-04-23 15:41:16 +
+++ b/source/lib/python/config.m4   2007-04-23 17:05:15 +
@@ -178,122 +178,6 @@
 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
 EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
 
-# checks for alternative programs
-
-# compiler flags are generated in two sets, BASECFLAGS and OPT.  OPT is just
-# for debug/optimization stuff.  BASECFLAGS is for flags that are required
-# just to get things to compile and link.  Users are free to override OPT
-# when running configure or make.  The build should not break if they do.
-# BASECFLAGS should generally not be messed with, however.
-
-# XXX shouldn't some/most/all of this code be merged with the stuff later
-# on that fiddles with OPT and BASECFLAGS?
-AC_MSG_CHECKING(for --without-gcc)
-AC_ARG_WITH(gcc,
-AC_HELP_STRING(--without-gcc,never use gcc),
-[
-   case $withval in
-   no) CC=cc
-   without_gcc=yes;;
-   yes)CC=gcc
-   without_gcc=no;;
-   *)  CC=$withval
-   without_gcc=$withval;;
-   esac], [
-   case $ac_sys_system in
-   AIX*)   CC=cc_r
-   without_gcc=;;
-   BeOS*)
-   case $BE_HOST_CPU in
-   ppc)
-   CC=mwcc
-   without_gcc=yes
-   BASECFLAGS="$BASECFLAGS -export pragma"
-   OPT="$OPT -O"
-   LDFLAGS="$LDFLAGS -nodup"
-   ;;
-   x86)
-   CC=gcc
-   without_gcc=no
-   OPT="$OPT -O"
-   ;;
-   *)
-   AC_MSG_ERROR([Unknown BeOS platform "$BE_HOST_CPU"])
-   ;;
-   esac
-   AR="\$(srcdir)/lib/python/Modules/ar_beos"
-   RANLIB=:
-   ;;
-Monterey*)
-RANLIB=:
-without_gcc=;;
-   *)  without_gcc=no;;
-   esac])
-AC_MSG_RESULT($without_gcc)
-
-# If the user switches compilers, we can't believe the cache
-if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
-then
-  AC_MSG_ERROR([cached CC is different -- throw away $cache_file
-(it is also a good idea to do 'make clean' before compiling)])
-fi
-
-AC_PROG_CC
-
-AC_SUBST(CXX)
-AC_SUBST(MAINCC)
-AC_MSG_CHECKING(for --with-cxx-main=)
-AC_ARG_WITH(cxx_main,
-AC_HELP_STRING([--with-cxx-main=],
-   [compile main() and link python executable with C++ 
compiler]),
-[
-   
-   case $withval in
-   no) with_cxx_main=no
-   MAINCC='$(CC)';;
-   yes)with_cxx_main=yes
-   MAINCC='$(CXX)';;
-   *)  with_cxx_main=yes
-   MAINCC=$withval
-   if test -z "$CXX"
-   then
-   CXX=$withval
-   fi;;
-   esac], [
-   with_cxx_main=no
-   MAINCC='$(CC)'
-])
-AC_MSG_RESULT($with_cxx_main)
-
-preset_cxx="$CXX"
-if test -z "$CXX"
-then
-case "$CC" in
-gcc)AC_PATH_PROG(CXX, [g++], [g++], [notfound]) ;;
-cc) AC_PATH_PROG(CXX, [c++], [c++], [notfound]) ;;
-esac
-   if test "$CXX" = "notfound"
-   then
-   CXX=""
-   fi
-fi
-if test -z "$CXX"
-then
-   AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
-   if test "$CXX" = "notfound"
-   then
-   CXX=""
-   fi
-fi
-if test "$preset_cxx" != "$CXX"
-then
-AC_MSG_WARN([
-
-  By default, distutils will build C++ extension modules with "$CXX".
-  If this is not intended, then set CXX on the configure command line.
-  ])
-fi
-
 # Check for unsupported systems
 c

svn commit: samba r22504 - in branches: SAMBA_3_0/source/rpc_server SAMBA_3_0_25/source/rpc_server

2007-04-24 Thread jmcd
Author: jmcd
Date: 2007-04-24 15:56:02 + (Tue, 24 Apr 2007)
New Revision: 22504

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

Log:
Fix bug Jerry found during his tutorial.  Sorry :-(

Allows authorized users (e.g. BUILTIN\Administrators members) to
set attributes on an account, particularly "user cannot change 
password".

add become_root() around updating attributes, after checking that
access has been granted.  

Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
   branches/SAMBA_3_0_25/source/rpc_server/srv_samr_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c  2007-04-24 13:55:04 UTC 
(rev 22503)
+++ branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c  2007-04-24 15:56:02 UTC 
(rev 22504)
@@ -724,7 +724,12 @@
return NT_STATUS_ACCESS_DENIED;
}
 
-   status = pdb_update_sam_account(sampass);
+   status = access_check_samr_function(acc_granted, 
SA_RIGHT_USER_SET_ATTRIBUTES, "_samr_set_sec_obj");
+   if NT_STATUS_IS_OK(status) {
+   become_root();
+   status = pdb_update_sam_account(sampass);
+   unbecome_root();
+   }
 
TALLOC_FREE(sampass);
 

Modified: branches/SAMBA_3_0_25/source/rpc_server/srv_samr_nt.c
===
--- branches/SAMBA_3_0_25/source/rpc_server/srv_samr_nt.c   2007-04-24 
13:55:04 UTC (rev 22503)
+++ branches/SAMBA_3_0_25/source/rpc_server/srv_samr_nt.c   2007-04-24 
15:56:02 UTC (rev 22504)
@@ -739,7 +739,12 @@
return NT_STATUS_ACCESS_DENIED;
}
 
-   status = pdb_update_sam_account(sampass);
+   status = access_check_samr_function(acc_granted, 
SA_RIGHT_USER_SET_ATTRIBUTES, "_samr_set_sec_obj");
+   if NT_STATUS_IS_OK(status) {
+   become_root();
+   status = pdb_update_sam_account(sampass);
+   unbecome_root();
+   }
 
TALLOC_FREE(sampass);
 



Rev 185: add version printout in http://samba.org/~tridge/ctdb

2007-04-24 Thread tridge

revno: 185
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Tue 2007-04-24 15:17:50 +0200
message:
  add version printout
modified:
  tools/ctdb_status.cctdb_status.c-20070420100703-w2y116bm9be7hmlv-2
=== modified file 'tools/ctdb_status.c'
--- a/tools/ctdb_status.c   2007-04-24 12:24:34 +
+++ b/tools/ctdb_status.c   2007-04-24 13:17:50 +
@@ -31,6 +31,7 @@
  */
 static void show_status(struct ctdb_status *s)
 {
+   printf("CTDB version %u\n", CTDB_VERSION);
printf(" client_packets_sent %u\n", s->client_packets_sent);
printf(" client_packets_recv %u\n", s->client_packets_recv);
printf("   req_call  %u\n", s->client.req_call);



svn commit: samba r22503 - in branches/SAMBA_4_0: . source/lib/socket

2007-04-24 Thread jelmer
Author: jelmer
Date: 2007-04-24 13:55:04 + (Tue, 24 Apr 2007)
New Revision: 22503

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

Log:
Add support for dgram to socket_ipv6. No tests yet...
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/socket/socket_ipv6.c


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:merge
...skipped...

Modified: branches/SAMBA_4_0/source/lib/socket/socket_ipv6.c
===
--- branches/SAMBA_4_0/source/lib/socket/socket_ipv6.c  2007-04-24 12:56:23 UTC 
(rev 22502)
+++ branches/SAMBA_4_0/source/lib/socket/socket_ipv6.c  2007-04-24 13:55:04 UTC 
(rev 22503)
@@ -190,7 +190,12 @@
struct sockaddr_in cli_addr;
socklen_t cli_addr_len = sizeof(cli_addr);
int new_fd;
+   
+   if (sock->type != SOCKET_TYPE_STREAM) {
+   return NT_STATUS_INVALID_PARAMETER;
+   }
 
+
new_fd = accept(sock->fd, (struct sockaddr *)&cli_addr, &cli_addr_len);
if (new_fd == -1) {
return map_nt_error_from_unix(errno);
@@ -249,6 +254,62 @@
return NT_STATUS_OK;
 }
 
+static NTSTATUS ipv6_recvfrom(struct socket_context *sock, void *buf, 
+ size_t wantlen, size_t *nread, 
+ TALLOC_CTX *addr_ctx, struct socket_address 
**_src)
+{
+   ssize_t gotlen;
+   struct sockaddr_in6 *from_addr;
+   socklen_t from_len = sizeof(*from_addr);
+   struct socket_address *src;
+   struct hostent *he;
+   
+   src = talloc(addr_ctx, struct socket_address);
+   if (!src) {
+   return NT_STATUS_NO_MEMORY;
+   }
+   
+   src->family = sock->backend_name;
+
+   from_addr = talloc(src, struct sockaddr_in6);
+   if (!from_addr) {
+   talloc_free(src);
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   src->sockaddr = (struct sockaddr *)from_addr;
+
+   *nread = 0;
+
+   gotlen = recvfrom(sock->fd, buf, wantlen, 0, 
+ src->sockaddr, &from_len);
+   if (gotlen == 0) {
+   talloc_free(src);
+   return NT_STATUS_END_OF_FILE;
+   } else if (gotlen == -1) {
+   talloc_free(src);
+   return map_nt_error_from_unix(errno);
+   }
+
+   src->sockaddrlen = from_len;
+
+   he = gethostbyaddr((void *)&from_addr->sin6_addr, 
sizeof(from_addr->sin6_addr), AF_INET6);
+   if (he == NULL) {
+   talloc_free(src);
+   return NT_STATUS_INTERNAL_ERROR;
+   }
+   src->addr = talloc_strdup(src, he->h_name);
+   if (src->addr == NULL) {
+   talloc_free(src);
+   return NT_STATUS_NO_MEMORY;
+   }
+   src->port = ntohs(from_addr->sin6_port);
+
+   *nread  = gotlen;
+   *_src   = src;
+   return NT_STATUS_OK;
+}
+
 static NTSTATUS ipv6_tcp_send(struct socket_context *sock, 
  const DATA_BLOB *blob, size_t *sendlen)
 {
@@ -266,6 +327,42 @@
return NT_STATUS_OK;
 }
 
+static NTSTATUS ipv6_sendto(struct socket_context *sock, 
+   const DATA_BLOB *blob, size_t *sendlen, 
+   const struct socket_address *dest_addr)
+{
+   ssize_t len;
+
+   if (dest_addr->sockaddr) {
+   len = sendto(sock->fd, blob->data, blob->length, 0, 
+dest_addr->sockaddr, dest_addr->sockaddrlen);
+   } else {
+   struct sockaddr_in6 srv_addr;
+   struct in6_addr addr;
+   
+   ZERO_STRUCT(srv_addr);
+   addr = interpret_addr6(dest_addr->addr);
+   if (addr.s6_addr == 0) {
+   return NT_STATUS_HOST_UNREACHABLE;
+   }
+   srv_addr.sin6_addr = addr;
+   srv_addr.sin6_port= htons(dest_addr->port);
+   srv_addr.sin6_family  = PF_INET6;
+   
+   *sendlen = 0;
+   
+   len = sendto(sock->fd, blob->data, blob->length, 0, 
+(struct sockaddr *)&srv_addr, sizeof(srv_addr));
+   }
+   if (len == -1) {
+   return map_nt_error_from_unix(errno);
+   }   
+
+   *sendlen = len;
+
+   return NT_STATUS_OK;
+}
+
 static NTSTATUS ipv6_tcp_set_option(struct socket_context *sock, const char 
*option, const char *val)
 {
set_socket_options(sock->fd, option);
@@ -410,6 +507,8 @@
.fn_listen  = ipv6_tcp_listen,
.fn_accept  = ipv6_tcp_accept,
.fn_recv= ipv6_tcp_recv,
+   .fn_recvfrom= ipv6_recvfrom,
+   .fn_sendto  = ipv6_sendto,
.fn_send= ipv6_tcp_send,
.fn_close   = ipv6_tcp_close

svn commit: samba r22502 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd

2007-04-24 Thread jra
Author: jra
Date: 2007-04-24 12:56:23 + (Tue, 24 Apr 2007)
New Revision: 22502

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

Log:
Fix bug #4536 - delete symlinks to a directory correctly.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0_25/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===
--- branches/SAMBA_3_0/source/smbd/reply.c  2007-04-24 09:35:55 UTC (rev 
22501)
+++ branches/SAMBA_3_0/source/smbd/reply.c  2007-04-24 12:56:23 UTC (rev 
22502)
@@ -3867,7 +3867,23 @@
int ret;
SMB_STRUCT_STAT st;
 
-   ret = SMB_VFS_RMDIR(conn,directory);
+   /* Might be a symlink. */
+   if(SMB_VFS_LSTAT(conn, directory, &st) != 0) {
+   return map_nt_error_from_unix(errno);
+   }
+
+   if (S_ISLNK(st.st_mode)) {
+   /* Is what it points to a directory ? */
+   if(SMB_VFS_STAT(conn, directory, &st) != 0) {
+   return map_nt_error_from_unix(errno);
+   }
+   if (!(S_ISDIR(st.st_mode))) {
+   return NT_STATUS_NOT_A_DIRECTORY;
+   }
+   ret = SMB_VFS_UNLINK(conn,directory);
+   } else {
+   ret = SMB_VFS_RMDIR(conn,directory);
+   }
if (ret == 0) {
notify_fname(conn, NOTIFY_ACTION_REMOVED,
 FILE_NOTIFY_CHANGE_DIR_NAME,

Modified: branches/SAMBA_3_0_25/source/smbd/reply.c
===
--- branches/SAMBA_3_0_25/source/smbd/reply.c   2007-04-24 09:35:55 UTC (rev 
22501)
+++ branches/SAMBA_3_0_25/source/smbd/reply.c   2007-04-24 12:56:23 UTC (rev 
22502)
@@ -3866,7 +3866,23 @@
int ret;
SMB_STRUCT_STAT st;
 
-   ret = SMB_VFS_RMDIR(conn,directory);
+   /* Might be a symlink. */
+   if(SMB_VFS_LSTAT(conn, directory, &st) != 0) {
+   return map_nt_error_from_unix(errno);
+   }
+
+   if (S_ISLNK(st.st_mode)) {
+   /* Is what it points to a directory ? */
+   if(SMB_VFS_STAT(conn, directory, &st) != 0) {
+   return map_nt_error_from_unix(errno);
+   }
+   if (!(S_ISDIR(st.st_mode))) {
+   return NT_STATUS_NOT_A_DIRECTORY;
+   }
+   ret = SMB_VFS_UNLINK(conn,directory);
+   } else {
+   ret = SMB_VFS_RMDIR(conn,directory);
+   }
if (ret == 0) {
notify_fname(conn, NOTIFY_ACTION_REMOVED,
 FILE_NOTIFY_CHANGE_DIR_NAME,



Rev 184: fit some more windows across a screen in http://samba.org/~tridge/ctdb

2007-04-24 Thread tridge

revno: 184
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Tue 2007-04-24 14:24:34 +0200
message:
  fit some more windows across a screen
modified:
  tools/ctdb_status.cctdb_status.c-20070420100703-w2y116bm9be7hmlv-2
=== modified file 'tools/ctdb_status.c'
--- a/tools/ctdb_status.c   2007-04-22 16:57:22 +
+++ b/tools/ctdb_status.c   2007-04-24 12:24:34 +
@@ -56,8 +56,8 @@
printf(" lockwait_calls  %u\n", s->lockwait_calls);
printf(" pending_lockwait_calls  %u\n", s->pending_lockwait_calls);
printf(" max_redirect_count  %u\n", s->max_redirect_count);
-   printf(" max_call_latency%.6f seconds\n", s->max_call_latency);
-   printf(" max_lockwait_latency%.6f seconds\n", 
s->max_lockwait_latency);
+   printf(" max_call_latency%.6f sec\n", s->max_call_latency);
+   printf(" max_lockwait_latency%.6f sec\n", s->max_lockwait_latency);
 }
 
 /*



svn commit: samba r22501 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module: ldbbrowse netmgr

2007-04-24 Thread mimir
Author: mimir
Date: 2007-04-24 09:35:55 + (Tue, 24 Apr 2007)
New Revision: 22501

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

Log:
dispatching events explicitly is not necessary.


rafal


Modified:
   
branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/LdbBrowse.js
   branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/UsersView.js


Changeset:
Modified: 
branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/LdbBrowse.js
===
--- 
branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/LdbBrowse.js 
2007-04-24 09:10:43 UTC (rev 22500)
+++ 
branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/LdbBrowse.js 
2007-04-24 09:35:55 UTC (rev 22501)
@@ -42,7 +42,6 @@
   // Force the global database to be opened
   var dbName = module.fsm.getObject("dbName");
   dbName.setSelected(dbName.getList().getFirstChild());
-  dbName.dispatchEvent(new qx.event.type.Event("changeSelection"), true);
 };
 
 

Modified: 
branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/UsersView.js
===
--- 
branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/UsersView.js
2007-04-24 09:10:43 UTC (rev 22500)
+++ 
branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/UsersView.js
2007-04-24 09:35:55 UTC (rev 22501)
@@ -69,7 +69,6 @@
 
   // Set default selection and dispatch the respective event to initialise the 
view
   cmbDomain.setSelected(selectedItem);
-  cmbDomain.dispatchEvent(new qx.event.type.Event("changeSelected"), true);
 
   // Create an empty list view with sample column
   this._columns = { username : { label: "Username", width: 150, type: "text" 
}};



svn commit: samba r22500 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr: .

2007-04-24 Thread mimir
Author: mimir
Date: 2007-04-24 09:10:43 + (Tue, 24 Apr 2007)
New Revision: 22500

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

Log:
there's a better way to find out if there are any children


rafal


Modified:
   branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js


Changeset:
Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js
===
--- branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js  
2007-04-24 08:36:41 UTC (rev 22499)
+++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js  
2007-04-24 09:10:43 UTC (rev 22500)
@@ -215,8 +215,8 @@
 
 qx.Proto.openUserManager = function(module, domainName)
 {
-  // Remove existing panel if there is any
-  if (this._panel.getChildrenLength() > 0)
+  // Remove existing panel if there is any - there can be only one at the time
+  if (this._panel.hasChildren())
   {
 this._panel.removeAll();
   }



svn commit: samba r22499 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr: .

2007-04-24 Thread mimir
Author: mimir
Date: 2007-04-24 08:36:41 + (Tue, 24 Apr 2007)
New Revision: 22499

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

Log:
UsrCtx should be created within UsersView. Tree widget just
opens it and passes the domain name(s) to operate on (selectable
via combo box).


rafal


Modified:
   branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js
   branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js
   branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/UsersView.js


Changeset:
Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js
===
--- branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js  
2007-04-24 07:57:44 UTC (rev 22498)
+++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js  
2007-04-24 08:36:41 UTC (rev 22499)
@@ -73,6 +73,13 @@
  "Transition_Idle_to_Idle_via_tree_selection_changed"
   },
 
+  "changeSelected":
+  {
+// this one is dispatched from UsersView widget
+   "domainName":
+  "Transition_Idle_to_AwaitRpcResult_via_domainName_changed"
+  },
+
  "changeNetCtx" :
  {
"swat.module.netmgr.Gui" :
@@ -120,7 +127,7 @@
   var trans = new qx.util.fsm.Transition(
 "Transition_Idle_to_Idle_via_tree_selection_changed",
 {
-  "nextState" : "State_AwaitRpcResult",
+  "nextState" : "State_Idle",
 
   "ontransition" : function(fsm, event)
   {
@@ -135,15 +142,14 @@
 {
  module.setNetCtx(parentNode.netCtx);
}
-
+   
+   var domainName = parentNode.label;
var nodeName = selectedNode.label;
-   var callName = undefined;   // rpc call name
-   var callArgs = [ gui.getNetCtx() ];   // NetContex goes first
 
switch (nodeName)
 {
case "Users":
- callName = "UserMgr";
+ gui.openUserManager(module, domainName);
  break;
 
case "Groups":
@@ -155,14 +161,26 @@
default:
  alert("Undefined call selected for node=['" + nodeName + "']");
}
+  }
+  
+});
 
-   // Bail out if no appropriate call name has been found
-   if (callName == undefined) return;
+  // Add the new transition
+  state.addTransition(trans);
 
-   var req = _this.callRpc(fsm, "samba.ejsnet", callName, callArgs);
+  var trans = new qx.util.fsm.Transition(
+"Transition_Idle_to_AwaitRpcResult_via_domainName_changed",
+{
+  "nextState" : "State_AwaitRpcResult",
+
+  "ontransition" : function(fsm, event)
+  {
+   var domainName = fsm.getObject("domainName").getValue();
+   var netCtxId = swat.module.netmgr.Gui.getInstance().getNetCtx();
+   
+   var req = _this.callRpc(fsm, "samba.ejsnet", "UserMgr", [ netCtxId, 
domainName ]);
req.setUserData("requestType", "UserMgr");
   }
-  
 });
 
   // Add the new transition
@@ -175,7 +193,8 @@
 
   "ontransition" : function(fsm, event)
   {
-   var netCtxId = 0;
+   var netCtxId = swat.module.netmgr.Gui.getInstance().getNetCtx();
+
var req = _this.callRpc(fsm, "samba.ejsnet", "NetContextCreds", [ 
netCtxId ]);
req.setUserData("requestType", "NetContextCreds");
   }

Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js
===
--- branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js  
2007-04-24 07:57:44 UTC (rev 22498)
+++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js  
2007-04-24 08:36:41 UTC (rev 22499)
@@ -213,6 +213,20 @@
 };
 
 
+qx.Proto.openUserManager = function(module, domainName)
+{
+  // Remove existing panel if there is any
+  if (this._panel.getChildrenLength() > 0)
+  {
+this._panel.removeAll();
+  }
+
+  // Create user view, pass the context and the view to the panel
+  var view = new swat.module.netmgr.UsersView(module.fsm, domainName);
+  this._panel.add(view);
+};
+
+
 qx.Proto._addHostNode = function(module, rpcRequest, local)
 {
   var fsm = module.fsm;
@@ -260,14 +274,8 @@
 
 qx.Proto._initUserManager = function(module, rpcRequest)
 {
-  // Get obtained UsrCtx handle
+  // Get obtained usrCtx handle
   var usrCtx = rpcRequest.getUserData("result").data;
-
-  // Create user view and pass the context
-  var view = new swat.module.netmgr.UsersView(module.fsm);
-  view.setUsrCtx(usrCtx);
-  
-  this._panel.add(view);
 };
 
 

Modified: 
branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/UsersView.js
===
--- 
branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/UsersView.js
2007-04-24 07:57:44 UTC (rev 22498)
+++ 
branches/SAMBA_4_0/webapps/swat/sourc

svn commit: samba r22498 - in branches/SAMBA_4_0/source/script/tests: .

2007-04-24 Thread abartlet
Author: abartlet
Date: 2007-04-24 07:57:44 + (Tue, 24 Apr 2007)
New Revision: 22498

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

Log:
The initial LDIF import into Fedora DS didn't work, so just push this
onto the end of dse.ldif.

This make Fedora DS work with multiple naming contexts.

Andrew Bartlett


Modified:
   branches/SAMBA_4_0/source/script/tests/Samba4.pm


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/Samba4.pm
===
--- branches/SAMBA_4_0/source/script/tests/Samba4.pm2007-04-24 05:57:56 UTC 
(rev 22497)
+++ branches/SAMBA_4_0/source/script/tests/Samba4.pm2007-04-24 07:57:44 UTC 
(rev 22498)
@@ -201,7 +201,7 @@
 RootDN= cn=Manager,$basedn
 RootDNPwd= $password
 ServerIdentifier= samba4
-InstallLdifFile=$fedora_ds_initial_ldif
+#InstallLdifFile=$fedora_ds_initial_ldif
 
 inst_dir= $fedora_ds_dir
 config_dir= $fedora_ds_dir
@@ -220,38 +220,32 @@
close(CONF);
 
open(LDIF, ">$fedora_ds_initial_ldif");
-   print LDIF "
-# These entries need to be added to get the container for the 
-# provision to be aimed at.
 
-dn: cn=\"$basedn\",cn=mapping tree,cn=config
-objectclass: top
-objectclass: extensibleObject
-objectclass: nsMappingTree
-nsslapd-state: backend
-nsslapd-backend: userData
-cn: $basedn
+my $dir = getcwd();
+chdir "$ENV{FEDORA_DS_PREFIX}/bin" || die;
+   if (system("perl $ENV{FEDORA_DS_PREFIX}/bin/ds_newinst.pl 
$fedora_ds_inf >&2") != 0) {
+chdir $dir;
+die("perl $ENV{FEDORA_DS_PREFIX}/bin/ds_newinst.pl $fedora_ds_inf 
FAILED: $?");
+}
+chdir $dir || die;
+   foreach(<$fedora_ds_dir/schema/*>) {
+   unlink unless (/00core.*/);
+   }
 
-dn: cn=userData,cn=ldbm database,cn=plugins,cn=config
-objectclass: extensibleObject
-objectclass: nsBackendInstance
-nsslapd-suffix: $basedn
-cn=userData
-
-dn: cn=\"cn=Configuration,$basedn\",cn=mapping tree,cn=config
+   open(LDIF, ">>$fedora_ds_dir/dse.ldif");
+   print LDIF "dn: cn=\"cn=Configuration,$basedn\",cn=mapping 
tree,cn=config
 objectclass: top
 objectclass: extensibleObject
 objectclass: nsMappingTree
 nsslapd-state: backend
 nsslapd-backend: configData
-nsslapd-parent-suffix: $basedn
 cn: cn=Configuration,$basedn
 
 dn: cn=configData,cn=ldbm database,cn=plugins,cn=config
 objectclass: extensibleObject
 objectclass: nsBackendInstance
 nsslapd-suffix: cn=Configuration,$basedn
-cn=configData
+cn: configData
 
 dn: cn=\"cn=Schema,cn=Configuration,$basedn\",cn=mapping tree,cn=config
 objectclass: top
@@ -259,30 +253,15 @@
 objectclass: nsMappingTree
 nsslapd-state: backend
 nsslapd-backend: schemaData
-nsslapd-parent-suffix: cn=Configuration,$basedn
 cn: cn=Schema,cn=Configuration,$basedn
 
 dn: cn=schemaData,cn=ldbm database,cn=plugins,cn=config
 objectclass: extensibleObject
 objectclass: nsBackendInstance
 nsslapd-suffix: cn=Schema,cn=Configuration,$basedn
-cn=schemaData
-";
-   close(LDIF);
+cn: schemaData
 
-my $dir = getcwd();
-chdir "$ENV{FEDORA_DS_PREFIX}/bin" || die;
-   if (system("perl $ENV{FEDORA_DS_PREFIX}/bin/ds_newinst.pl 
$fedora_ds_inf >&2") != 0) {
-chdir $dir;
-die("perl $ENV{FEDORA_DS_PREFIX}/bin/ds_newinst.pl $fedora_ds_inf 
FAILED: $?");
-}
-chdir $dir || die;
-   foreach(<$fedora_ds_dir/schema/*>) {
-   unlink unless (/00core.*/);
-   }
-
-   open(LDIF, ">>$fedora_ds_dir/dse.ldif");
-   print LDIF "dn: cn=bitwise,cn=plugins,cn=config
+dn: cn=bitwise,cn=plugins,cn=config
 objectClass: top
 objectClass: nsSlapdPlugin
 objectClass: extensibleObject