diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-11 13:10:11 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-11 13:10:11 +0100 |
commit | e4165448d778db1721b1c7670b25ae3e40917d86 (patch) | |
tree | 027b825fa742c1dbb97874c179cdeea6dba92a58 | |
parent | cac225ba7daf8d88d858292902480415f0fa00e2 (diff) | |
parent | de03c4a3eadd8180e5bda5b176f1abebff613a15 (diff) | |
download | samba-e4165448d778db1721b1c7670b25ae3e40917d86.tar.gz samba-e4165448d778db1721b1c7670b25ae3e40917d86.tar.bz2 samba-e4165448d778db1721b1c7670b25ae3e40917d86.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-python
(This used to be commit 35f5c8294e9f3b304987597d4bcfc75fdda05982)
-rw-r--r-- | README | 37 | ||||
-rw-r--r-- | TODO | 6 | ||||
-rw-r--r-- | prog_guide.txt | 60 | ||||
-rwxr-xr-x | source4/autogen.sh | 14 | ||||
-rw-r--r-- | source4/build/m4/public.m4 | 27 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 118 | ||||
-rw-r--r-- | source4/configure.ac | 8 | ||||
-rw-r--r-- | source4/dynconfig.mk | 20 | ||||
-rw-r--r-- | source4/lib/registry/tools/regshell.c | 3 | ||||
-rw-r--r-- | source4/main.mk | 105 | ||||
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 2 | ||||
-rw-r--r-- | source4/scripting/libjs/provision.js | 4 |
12 files changed, 175 insertions, 229 deletions
@@ -1,3 +1,6 @@ +Readme for Samba 4 +================== + Samba 4 is the ambitious next version of the Samba suite that is being developed in parallel to the stable 3.0 series. The main emphasis in this branch is support for the Active Directory logon protocols used @@ -15,8 +18,8 @@ Technology Preview (TP), aimed at allowing you, our users, managers and developers to see how we have progressed, and to invite your feedback and support. -WARNINGS -======== +Warnings +-------- Samba4 is currently at alpha stage. That is more a reference to Samba4's lack of the features we expect you will need than a statement @@ -58,8 +61,8 @@ logged in user, much as Samba3 does. As such, we must strongly recommend against using Samba4 in a production environment at this stage. -NEW FEATURES -============ +New Features +------------ Samba4 supports the server-side of the Active Directory logon environment used by Windows 2000 and later, so we can do full domain join @@ -93,20 +96,20 @@ working on modules to map between AD-like behaviours and this back-end. We are aiming for Samba 4 to be powerful front-end to large directories. -CHANGES -======= +Changes +------- Those familiar with Samba 3 can find a list of user-visible changes since that release series in the NEWS file. - - An optional password is no longer supported as the second argument to - smbclient. +- An optional password is no longer supported as the second argument to + smbclient. - - The default location of smb.conf in non-FHS builds has changed from the - PREFIX/lib directory to the PREFIX/etc directory. +- The default location of smb.conf in non-FHS builds has changed from the + PREFIX/lib directory to the PREFIX/etc directory. -KNOWN ISSUES -============ +Known issues +------------ - Standalone server and domain member roles are not currently supported. While we have much of the infrastructure required, we @@ -117,14 +120,15 @@ KNOWN ISSUES - SWAT can be painful with <TAB> and forms. Just use the mouse, as the JavaScript layer doing this will change. -RUNNING Samba4 -============== +Running Samba4 +-------------- A short guide to setting up Samba 4 can be found in the howto.txt file in root of the tarball. -DEVELOPMENT and FEEDBACK -======================== +Development and feedback +------------------------ + Bugs can be filed at https://bugzilla.samba.org/. Please look at the STATUS file before filing a bug to see if a particular is supposed to work yet. @@ -134,4 +138,3 @@ the #samba-technical IRC channel (on irc.freenode.net) and the samba-technical mailing list (see http://lists.samba.org/ for details). - @@ -3,15 +3,9 @@ source/lib/registry/TODO source/lib/tdr/TODO source/pidl/TODO -upgrade process (from Samba3): - - Rename upgrade to upgrade3 (to avoid confusion with upgrades - from earlier Samba4 releases in the future) - - Add support for reading WINS TDB files as well as WINS dat files. - - seperate adminlog mechanism (as opposed to the current DEBUG log, which is not really aimed at administrators but more at developers) Perhaps similar to eventlog so we can also use eventlog to retrieve the data? -- improve handling of test results in testsuite - testsuite for the 'net' tool diff --git a/prog_guide.txt b/prog_guide.txt index 3814a11a4e..bba58b31b3 100644 --- a/prog_guide.txt +++ b/prog_guide.txt @@ -58,11 +58,11 @@ Static and Global Data The basic rule is "avoid static and global data like the plague". What do I mean by static data? The way to tell if you have static data in a -file is to use the "size" utility in Linux. For example if we run: +file is to use the "size" utility in Linux. For example if we run:: size libcli/raw/*.o -in Samba4 then you get the following: +in Samba4 then you get the following:: text data bss dec hex filename 2015 0 0 2015 7df libcli/raw/clikrb5.o @@ -91,7 +91,7 @@ notice that the "data" and "bss" columns are all zero? That is good. If there are any non-zero values in data or bss then that indicates static data and is bad (as a rule of thumb). -Lets compare that result to the equivalent in Samba3: +Lets compare that result to the equivalent in Samba3:: text data bss dec hex filename 3978 0 0 3978 f8a libsmb/asn1.o @@ -142,11 +142,11 @@ notice all of the non-zero data and bss elements? Every bit of that data is a bug waiting to happen. Static data is evil as it has the following consequences: - - it makes code much less likely to be thread-safe - - it makes code much less likely to be recursion-safe - - it leads to subtle side effects when the same code is called from - multiple places - - doesn't play well with shared libraries or plugins +- it makes code much less likely to be thread-safe +- it makes code much less likely to be recursion-safe +- it leads to subtle side effects when the same code is called from + multiple places +- doesn't play well with shared libraries or plugins Static data is particularly evil in library code (such as our internal smb and rpc libraries). If you can get rid of all static data in @@ -237,23 +237,23 @@ In the Samba3 msrpc code we used explicit parse structures for all msrpc functions. The problem is that we didn't just put all of the real variables in these structures, we also put in all the artifacts as well. A good example is the security descriptor strucrure that -looks like this in Samba3: +looks like this in Samba3:: -typedef struct security_descriptor_info -{ - uint16 revision; - uint16 type; + typedef struct security_descriptor_info + { + uint16 revision; + uint16 type; - uint32 off_owner_sid; - uint32 off_grp_sid; - uint32 off_sacl; - uint32 off_dacl; + uint32 off_owner_sid; + uint32 off_grp_sid; + uint32 off_sacl; + uint32 off_dacl; - SEC_ACL *dacl; - SEC_ACL *sacl; - DOM_SID *owner_sid; - DOM_SID *grp_sid; -} SEC_DESC; + SEC_ACL *dacl; + SEC_ACL *sacl; + DOM_SID *owner_sid; + DOM_SID *grp_sid; + } SEC_DESC; The problem with this structure is all the off_* variables. Those are not part of the interface, and do not appear in any real descriptions @@ -301,11 +301,11 @@ just about everywhere. The first aspect of the async design to look at is the SMB client library. Lets take a look at the following three functions in -libcli/raw/rawfile.c: +libcli/raw/rawfile.c:: -struct cli_request *smb_raw_seek_send(struct cli_tree *tree, struct smb_seek *parms); -NTSTATUS smb_raw_seek_recv(struct cli_request *req, struct smb_seek *parms); -NTSTATUS smb_raw_seek(struct cli_tree *tree, struct smb_seek *parms); + struct cli_request *smb_raw_seek_send(struct cli_tree *tree, struct smb_seek *parms); + NTSTATUS smb_raw_seek_recv(struct cli_request *req, struct smb_seek *parms); + NTSTATUS smb_raw_seek(struct cli_tree *tree, struct smb_seek *parms); Go and read them now then come back. @@ -327,7 +327,7 @@ one called smb_raw_XXXX(). That just calls the first two in order, and blocks waiting for the reply. But what if you want to be called when the reply comes in? Yes, thats -possible. You can do things like this: +possible. You can do things like this:: struct cli_request *req; @@ -374,7 +374,7 @@ to just like in Samba3, but it also has the option of answering the request asynchronously. The only backend that currently does this is the CIFS backend, but I hope the other backends will soon do this to. -To make this work you need to do things like this in the backend: +To make this work you need to do things like this in the backend:: req->control_flags |= REQ_CONTROL_ASYNC; @@ -450,7 +450,7 @@ and read it. Yes, that means you!). Notice the union? That's how Samba4 allows a single NTVFS backend interface to handle the several different ways of doing a write operation in the SMB protocol. Now lets look at one section of that -union: +union:: /* SMBwriteX interface */ struct { @@ -473,7 +473,7 @@ union: see the "in" and "out" sections? The "in" section is for parameters that the SMB client sends on the wire as part of the request. The smbd front end parse code parses the wire request and fills in all those -parameters. It then calls the NTVFS interface which looks like this: +parameters. It then calls the NTVFS interface which looks like this:: NTSTATUS (*write)(struct request_context *req, union smb_write *io); diff --git a/source4/autogen.sh b/source4/autogen.sh index 9c73c96572..b721a45a99 100755 --- a/source4/autogen.sh +++ b/source4/autogen.sh @@ -1,9 +1,9 @@ #!/bin/sh -# Run this script to build samba from SVN. +# Run this script to build samba from git. -## insert all possible names (only works with -## autoconf 2.x +## insert all possible names (only works with +## autoconf 2.x) TESTAUTOHEADER="autoheader autoheader-2.53 autoheader2.50 autoheader259 autoheader253" TESTAUTOCONF="autoconf autoconf-2.53 autoconf2.50 autoconf259 autoconf253" @@ -12,7 +12,7 @@ AUTOCONFFOUND="0" ## -## Look for autoheader +## Look for autoheader ## for i in $TESTAUTOHEADER; do if which $i > /dev/null 2>&1; then @@ -24,7 +24,7 @@ for i in $TESTAUTOHEADER; do fi done -## +## ## Look for autoconf ## @@ -39,11 +39,11 @@ for i in $TESTAUTOCONF; do done -## +## ## do we have it? ## if test "$AUTOCONFFOUND" = "0" -o "$AUTOHEADERFOUND" = "0"; then - echo "$0: need autoconf 2.53 or later to build samba from SVN" >&2 + echo "$0: need autoconf 2.53 or later to build samba from git" >&2 exit 1 fi diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4 index 4192128bbd..467b63055c 100644 --- a/source4/build/m4/public.m4 +++ b/source4/build/m4/public.m4 @@ -21,11 +21,16 @@ dnl ####################################################### dnl SMB_SUBSYSTEM(name,obj_files,required_subsystems,cflags) AC_DEFUN([SMB_SUBSYSTEM], [ +MAKE_SETTINGS="$MAKE_SETTINGS +$1_OBJ_FILES = $2 +$1_CFLAGS = $4 +" + SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS ################################### # Start Subsystem $1 @<:@SUBSYSTEM::$1@:>@ -OBJ_FILES = $2 +OBJ_FILES = \$($1_OBJ_FILES) PRIVATE_DEPENDENCIES = $3 CFLAGS = $4 ENABLE = YES @@ -37,16 +42,22 @@ ENABLE = YES dnl SMB_LIBRARY(name,obj_files,required_subsystems,version,so_version,cflags,ldflags,pcname) AC_DEFUN([SMB_LIBRARY], [ +MAKE_SETTINGS="$MAKE_SETTINGS +$1_OBJ_FILES = $2 +$1_CFLAGS = $6 +$1_LDFLAGS = $7 +" + SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES ################################### # Start Library $1 @<:@LIBRARY::$1@:>@ -OBJ_FILES = $2 +OBJ_FILES = \$($1_OBJ_FILES) PRIVATE_DEPENDENCIES = $3 VERSION = $4 SO_VERSION = $5 CFLAGS = $6 -LDFLAGS = $7 +LDFLAGS = \$($1_LDFLAGS) PC_NAME = $8 ENABLE = YES # End Library $1 @@ -127,15 +138,21 @@ include $1 dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags,pcname) AC_DEFUN([SMB_EXT_LIB], [ +MAKE_SETTINGS="$MAKE_SETTINGS +$1_LIBS = $2 +$1_CFLAGS = $3 +$1_CPPFLAGS = $4 +$1_LDFLAGS = $5 +" SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS ################################### # Start Ext Lib $1 @<:@EXT_LIB::$1@:>@ -LIBS = $2 +LIBS = \$($1_LIBS) CFLAGS = $3 CPPFLAGS = $4 -LDFLAGS = $5 +LDFLAGS = \$($1_LDFLAGS) PC_NAME = $6 # End Ext Lib $1 ################################### diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 5799d89c57..865d231c0c 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -46,11 +46,10 @@ sub new($$$) $self->output("# Autogenerated by build/smb_build/makefile.pm #\n"); $self->output("################################################\n"); $self->output("\n"); + $self->output("include mkconfig.mk\n"); $self->output("default: all\n\n"); - $self->_prepare_path_vars(); - $self->_prepare_suffix_rules(); $self->_prepare_compiler_linker(); if (!$self->{automatic_deps}) { @@ -68,57 +67,6 @@ sub output($$) $self->{output} .= $text; } -sub _prepare_path_vars($) -{ - my ($self) = @_; - - $self->output(<< "__EOD__" -prefix = $self->{config}->{prefix} -exec_prefix = $self->{config}->{exec_prefix} -selftest_prefix = $self->{config}->{selftest_prefix} - -builddir = $self->{config}->{builddir} -srcdir = $self->{config}->{srcdir} -datarootdir = $self->{config}->{datarootdir} - -VPATH = \$(builddir):\$(srcdir):heimdal_build:heimdal/lib/asn1:heimdal/lib/krb5:heimdal/lib/gssapi:heimdal/lib/hdb:heimdal/lib/roken:heimdal/lib/des - -BASEDIR = $self->{config}->{prefix} -BINDIR = $self->{config}->{bindir} -SBINDIR = $self->{config}->{sbindir} -LIBDIR = $self->{config}->{libdir} -TORTUREDIR = $self->{config}->{libdir}/torture -MODULESDIR = $self->{config}->{modulesdir} -INCLUDEDIR = $self->{config}->{includedir} -CONFIGDIR = $self->{config}->{sysconfdir} -DATADIR = $self->{config}->{datadir} -SWATDIR = \$(DATADIR)/swat -JSDIR = \$(DATADIR)/js -SETUPDIR = \$(DATADIR)/setup -VARDIR = $self->{config}->{localstatedir} -LOGFILEBASE = $self->{config}->{logfilebase} -NCALRPCDIR = $self->{config}->{localstatedir}/ncalrpc -LOCKDIR = $self->{config}->{lockdir} -PIDDIR = $self->{config}->{piddir} -MANDIR = $self->{config}->{mandir} -PRIVATEDIR = $self->{config}->{privatedir} -WINBINDD_SOCKET_DIR = $self->{config}->{winbindd_socket_dir} - -__EOD__ -); -} - -sub _prepare_suffix_rules($) -{ - my ($self) = @_; - - $self->output(<< "__EOD__" -FIRST_PREREQ = $self->{config}->{FIRST_PREREQ} - -__EOD__ -); -} - sub _prepare_compiler_linker($) { my ($self) = @_; @@ -139,54 +87,12 @@ sub _prepare_compiler_linker($) } $self->output(<< "__EOD__" -SHELL=$self->{config}->{SHELL} -PERL=$self->{config}->{PERL} -PYTHON=$self->{config}->{PYTHON} -SWIG=$self->{config}->{SWIG} - -CPP=$self->{config}->{CPP} CPPFLAGS=$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\$(srcdir)/lib/replace -I\$(srcdir)/lib/talloc -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H $self->{config}->{CPPFLAGS} -CC=$self->{config}->{CC} -CFLAGS=$self->{config}->{CFLAGS} -CFLAG_NO_UNUSED_MACROS=$self->{config}->{CFLAG_NO_UNUSED_MACROS} -PICFLAG=$self->{config}->{PICFLAG} - INSTALL_LINK_FLAGS=$extra_link_flags -BNLD=$self->{config}->{LD} -BNLD_FLAGS=$self->{config}->{LDFLAGS} -L$libdir - -STLD=$self->{config}->{STLD} -STLD_FLAGS=$self->{config}->{STLD_FLAGS} - -SHLD=$self->{config}->{SHLD} -SHLD_FLAGS=$self->{config}->{SHLD_FLAGS} -L\$(builddir)/bin/shared - -MDLD=$self->{config}->{MDLD} -MDLD_FLAGS=$self->{config}->{MDLD_FLAGS} -L\$(builddir)/bin/shared - -SHLIBEXT=$self->{config}->{SHLIBEXT} - -HOSTCC=$self->{config}->{HOSTCC} -HOSTCC_FLAGS=-D_SAMBA_HOSTCC_ \$(CFLAGS) - -HOSTLD=$self->{config}->{HOSTLD} -HOSTLD_FLAGS=$self->{config}->{LDFLAGS} - -XSLTPROC=$self->{config}->{XSLTPROC} - -LIB_PATH_VAR=$self->{config}->{LIB_PATH_VAR} - -LEX=$self->{config}->{LEX} -YACC=$self->{config}->{YACC} -YAPP=$self->{config}->{YAPP} - -GCOV=$self->{config}->{GCOV} - -DEFAULT_TEST_OPTIONS=$self->{config}->{DEFAULT_TEST_OPTIONS} - +INTERN_LDFLAGS = -L$libdir __EOD__ ); } @@ -280,16 +186,16 @@ sub SharedModule($$) } else { push (@{$self->{shared_modules}}, "$ctx->{TARGET_SHARED_LIBRARY}"); push (@{$self->{plugins}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}"); - $self->{install_plugins} .= "\t\@echo Installing $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; - $self->{install_plugins} .= "\t\@mkdir -p \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/\n"; - $self->{install_plugins} .= "\t\@cp $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; - $self->{uninstall_plugins} .= "\t\@echo Uninstalling \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; - $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; + $self->{install_plugins} .= "\t\@echo Installing $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; + $self->{install_plugins} .= "\t\@mkdir -p \$(DESTDIR)\$(modulesdir)/$sane_subsystem/\n"; + $self->{install_plugins} .= "\t\@cp $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; + $self->{uninstall_plugins} .= "\t\@echo Uninstalling \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; + $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n"; if (defined($ctx->{ALIASES})) { foreach (@{$ctx->{ALIASES}}) { - $self->{install_plugins} .= "\t\@rm -f \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; - $self->{install_plugins} .= "\t\@ln -fs $ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; - $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; + $self->{install_plugins} .= "\t\@rm -f \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; + $self->{install_plugins} .= "\t\@ln -fs $ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; + $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n"; } } } @@ -329,7 +235,7 @@ __EOD__ $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $init_obj \@echo Linking \$\@ \@mkdir -p $ctx->{SHAREDDIR} - \@\$(MDLD) \$(MDLD_FLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ + \@\$(MDLD) \$(MDLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ \$($ctx->{TYPE}_$ctx->{NAME}\_FULL_OBJ_LIST) $init_obj \\ \$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) __EOD__ @@ -387,7 +293,7 @@ sub SharedLibrary($$) $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) \@echo Linking \$\@ \@mkdir -p $ctx->{SHAREDDIR} - \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ + \@\$(SHLD) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ \$($ctx->{TYPE}_$ctx->{NAME}\_FULL_OBJ_LIST) \\ \$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) \\ $soarg$lns diff --git a/source4/configure.ac b/source4/configure.ac index ed74bc1251..f7251f597b 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -201,3 +201,11 @@ CMP_RET=$? if test $CMP_RET != 0; then cp include/config_tmp.h include/config.h fi + +echo "configure: creating mkconfig.mk" +cat >mkconfig.mk<<CEOF +# mkconfig.mk - Autogenerated by configure, DO NOT EDIT! +AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [ +AC_Var = $AC_Var]) +$MAKE_SETTINGS +CEOF diff --git a/source4/dynconfig.mk b/source4/dynconfig.mk index 9c872da3e8..e970d4cd4c 100644 --- a/source4/dynconfig.mk +++ b/source4/dynconfig.mk @@ -4,20 +4,20 @@ OBJ_FILES = dynconfig.o # set these to where to find various files # These can be overridden by command line switches (see smbd(8)) # or in smb.conf (see smb.conf(5)) -CONFIGFILE = $(CONFIGDIR)/smb.conf -PKGCONFIGDIR = $(LIBDIR)/pkgconfig -LMHOSTSFILE = $(CONFIGDIR)/lmhosts +CONFIGFILE = $(sysconfdir)/smb.conf +PKGCONFIGDIR = $(libdir)/pkgconfig +LMHOSTSFILE = $(sysconfdir)/lmhosts PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" \ - -DBINDIR=\"$(BINDIR)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \ - -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" -DDATADIR=\"$(DATADIR)\" \ - -DLOGFILEBASE=\"$(LOGFILEBASE)\" \ - -DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \ + -DBINDIR=\"$(bindir)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \ + -DLOCKDIR=\"$(lockdir)\" -DPIDDIR=\"$(piddir)\" -DDATADIR=\"$(datadir)\" \ + -DLOGFILEBASE=\"$(logfilebase)\" \ + -DCONFIGDIR=\"$(sysconfdir)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \ -DSWATDIR=\"$(SWATDIR)\" \ - -DPRIVATE_DIR=\"$(PRIVATEDIR)\" \ - -DMODULESDIR=\"$(MODULESDIR)\" -DJSDIR=\"$(JSDIR)\" \ + -DPRIVATE_DIR=\"$(privatedir)\" \ + -DMODULESDIR=\"$(modulesdir)\" -DJSDIR=\"$(JSDIR)\" \ -DTORTUREDIR=\"$(TORTUREDIR)\" \ - -DSETUPDIR=\"$(SETUPDIR)\" -DWINBINDD_SOCKET_DIR=\"$(WINBINDD_SOCKET_DIR)\" + -DSETUPDIR=\"$(SETUPDIR)\" -DWINBINDD_SOCKET_DIR=\"$(winbindd_socket_dir)\" dynconfig.o: dynconfig.c Makefile @echo Compiling $< diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c index 93f28f3e5a..d5c506ab31 100644 --- a/source4/lib/registry/tools/regshell.c +++ b/source4/lib/registry/tools/regshell.c @@ -116,6 +116,9 @@ static WERROR cmd_predef(struct regshell_context *ctx, int argc, char **argv) argv[1], win_errstr(error)); return error; } + + ctx->path = strupper_talloc(ctx, argv[1]); + ctx->current = ret; } return WERR_OK; diff --git a/source4/main.mk b/source4/main.mk index 769cc4f1e4..f7ef4b445a 100644 --- a/source4/main.mk +++ b/source4/main.mk @@ -1,3 +1,18 @@ +VPATH = $(builddir):$(srcdir):heimdal_build:heimdal/lib/asn1:heimdal/lib/krb5:heimdal/lib/gssapi:heimdal/lib/hdb:heimdal/lib/roken:heimdal/lib/des + +BASEDIR = $(prefix) +TORTUREDIR = $(libdir)/torture +SWATDIR = $(datadir)/swat +JSDIR = $(datadir)/js +SETUPDIR = $(datadir)/setup +NCALRPCDIR = $(localstatedir)/ncalrpc + +BNLD = $(LD) +BNLD_FLAGS = $(LDFLAGS) + +HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS) +HOSTLD_FLAGS = $(LDFLAGS) + default: all include dynconfig.mk @@ -54,23 +69,23 @@ testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup showlayout:: @echo 'Samba will be installed into:' @echo ' basedir: $(BASEDIR)' - @echo ' bindir: $(BINDIR)' - @echo ' sbindir: $(SBINDIR)' - @echo ' libdir: $(LIBDIR)' - @echo ' modulesdir: $(MODULESDIR)' - @echo ' includedir: $(INCLUDEDIR)' - @echo ' vardir: $(VARDIR)' - @echo ' privatedir: $(PRIVATEDIR)' - @echo ' piddir: $(PIDDIR)' - @echo ' lockdir: $(LOCKDIR)' - @echo ' logfilebase: $(LOGFILEBASE)' + @echo ' bindir: $(bindir)' + @echo ' sbindir: $(sbindir)' + @echo ' libdir: $(libdir)' + @echo ' modulesdir: $(modulesdir)' + @echo ' includedir: $(includedir)' + @echo ' vardir: $(localstatedir)' + @echo ' privatedir: $(privatedir)' + @echo ' piddir: $(piddir)' + @echo ' lockdir: $(lockdir)' + @echo ' logfilebase: $(logfilebase)' @echo ' setupdir: $(SETUPDIR)' @echo ' jsdir: $(JSDIR)' @echo ' swatdir: $(SWATDIR)' - @echo ' mandir: $(MANDIR)' + @echo ' mandir: $(mandir)' @echo ' torturedir: $(TORTUREDIR)' - @echo ' datadir: $(DATADIR)' - @echo ' winbindd_socket_dir: $(WINBINDD_SOCKET_DIR)' + @echo ' datadir: $(datadir)' + @echo ' winbindd_socket_dir: $(winbindd_socket_dir)' showflags:: @echo ' srcdir = $(srcdir)' @@ -93,37 +108,37 @@ install:: showlayout everything installbin installdat installswat installmisc in installdirs:: @$(SHELL) $(srcdir)/script/installdirs.sh \ $(DESTDIR)$(BASEDIR) \ - $(DESTDIR)$(BINDIR) \ - $(DESTDIR)$(SBINDIR) \ + $(DESTDIR)$(bindir) \ + $(DESTDIR)$(sbindir) \ $(DESTDIR)$(TORTUREDIR) \ - $(DESTDIR)$(LIBDIR) \ - $(DESTDIR)$(MODULESDIR) \ - $(DESTDIR)$(MANDIR) \ - $(DESTDIR)$(VARDIR) \ - $(DESTDIR)$(PRIVATEDIR) \ - $(DESTDIR)$(DATADIR) \ - $(DESTDIR)$(PIDDIR) \ - $(DESTDIR)$(LOCKDIR) \ - $(DESTDIR)$(LOGFILEBASE) \ - $(DESTDIR)$(PRIVATEDIR)/tls \ - $(DESTDIR)$(INCLUDEDIR) \ + $(DESTDIR)$(libdir) \ + $(DESTDIR)$(modulesdir) \ + $(DESTDIR)$(mandir) \ + $(DESTDIR)$(localstatedir) \ + $(DESTDIR)$(privatedir) \ + $(DESTDIR)$(datadir) \ + $(DESTDIR)$(piddir) \ + $(DESTDIR)$(lockdir) \ + $(DESTDIR)$(logfilebase) \ + $(DESTDIR)$(privatedir)/tls \ + $(DESTDIR)$(includedir) \ $(DESTDIR)$(PKGCONFIGDIR) \ - $(DESTDIR)$(CONFIGDIR) \ + $(DESTDIR)$(sysconfdir) \ installbin:: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs @$(SHELL) $(srcdir)/script/installbin.sh \ $(INSTALLPERMS) \ $(DESTDIR)$(BASEDIR) \ - $(DESTDIR)$(SBINDIR) \ - $(DESTDIR)$(LIBDIR) \ - $(DESTDIR)$(VARDIR) \ + $(DESTDIR)$(sbindir) \ + $(DESTDIR)$(libdir) \ + $(DESTDIR)$(localstatedir) \ $(SBIN_PROGS) @$(SHELL) $(srcdir)/script/installbin.sh \ $(INSTALLPERMS) \ $(DESTDIR)$(BASEDIR) \ - $(DESTDIR)$(BINDIR) \ - $(DESTDIR)$(LIBDIR) \ - $(DESTDIR)$(VARDIR) \ + $(DESTDIR)$(bindir) \ + $(DESTDIR)$(libdir) \ + $(DESTDIR)$(localstatedir) \ $(BIN_PROGS) @$(SHELL) $(srcdir)/script/installtorture.sh \ $(INSTALLPERMS) \ @@ -131,23 +146,23 @@ installbin:: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs $(TORTURE_PROGS) installlib:: $(INSTALLABLE_SHARED_LIBS) $(STATIC_LIBS) installdirs - @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(LIBDIR) "$(SHLIBEXT)" $(INSTALLABLE_SHARED_LIBS) - #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(LIBDIR) "$(STLIBEXT)" $(STATIC_LIBS) + @$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(INSTALLABLE_SHARED_LIBS) + #@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS) installheader:: headers installdirs - @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(INCLUDEDIR) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS) + @srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS) installdat:: installdirs - @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(DATADIR) $(srcdir) + @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(datadir) $(srcdir) installswat:: installdirs @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir) installman:: manpages installdirs - @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(MANPAGES) + @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES) installmisc:: installdirs - @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(BINDIR) + @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(bindir) installpc:: installdirs @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES) @@ -159,19 +174,19 @@ uninstallmisc:: #FIXME uninstallbin:: - @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(SBIN_PROGS) - @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(BIN_PROGS) + @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(SBIN_PROGS) + @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(BIN_PROGS) @$(SHELL) $(srcdir)/script/uninstalltorture.sh $(DESTDIR)$(TORTUREDIR) $(TORTURE_PROGS) uninstalllib:: - @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(LIBDIR) $(SHARED_LIBS) - #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(LIBDIR) $(STATIC_LIBS) + @$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(SHARED_LIBS) + #@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(libdir) $(STATIC_LIBS) uninstallheader:: - @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(INCLUDEDIR) $(PUBLIC_HEADERS) + @$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(includedir) $(PUBLIC_HEADERS) uninstallman:: - @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(MANPAGES) + @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES) Makefile: config.status $(MK_FILES) ./config.status diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index ca9e7d15db..4af9da0f52 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -100,7 +100,7 @@ sub ParseFunction($$) pidl ""; pidl "call = &ndr_table_$if->{NAME}.calls[$op];"; pidl ""; - pidl "r = talloc(NULL, struct $fn->{NAME});"; + pidl "r = talloc(talloc_tos(), struct $fn->{NAME});"; pidl "if (r == NULL) {"; pidl "\treturn false;"; pidl "}"; diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js index e71498010c..dc9eae8e72 100644 --- a/source4/scripting/libjs/provision.js +++ b/source4/scripting/libjs/provision.js @@ -1124,7 +1124,7 @@ unixName: %s sambaPassword: %s objectClass: user ", - user_dn, username, dom_users, + user_dn, username, unixname, password); /* add the user to the users group as well @@ -1134,7 +1134,7 @@ dn: %s changetype: modify add: member member: %s -", +", dom_users, user_dn); |