diff options
-rw-r--r-- | source4/lib/replace/test/os2_delete.c | 9 | ||||
-rw-r--r-- | source4/scripting/python/config.m4 | 2 | ||||
-rw-r--r-- | source4/scripting/python/samba/provision.py | 5 |
3 files changed, 12 insertions, 4 deletions
diff --git a/source4/lib/replace/test/os2_delete.c b/source4/lib/replace/test/os2_delete.c index c6ef180017..b45c135355 100644 --- a/source4/lib/replace/test/os2_delete.c +++ b/source4/lib/replace/test/os2_delete.c @@ -39,8 +39,15 @@ static void create_files(void) int i; for (i=0;i<NUM_FILES;i++) { char fname[40]; + int fd; sprintf(fname, TESTDIR "/test%u.txt", i); - close(open(fname, O_CREAT|O_RDWR, 0600)) == 0 || FAILED("close"); + fd = open(fname, O_CREAT|O_RDWR, 0600); + if (fd < 0) { + FAILED("open"); + } + if (close(fd) != 0) { + FAILED("close"); + } } } diff --git a/source4/scripting/python/config.m4 b/source4/scripting/python/config.m4 index aac98ebc60..3790071ba8 100644 --- a/source4/scripting/python/config.m4 +++ b/source4/scripting/python/config.m4 @@ -23,9 +23,7 @@ AC_DEFUN([TRY_LINK_PYTHON], AC_TRY_LINK([ /* we have our own configure tests */ - #define Py_PYCONFIG_H 1 #include <Python.h> - #include <stdlib.h> ],[ Py_InitModule(NULL, NULL); ],[ diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 47d00f8871..e97ce694b4 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -373,7 +373,10 @@ def load_or_make_smbconf(smbconf, setup_path, hostname, domain, realm, serverrol lockdir_line = "lock dir = " + os.path.abspath(targetdir) default_lp.set("lock dir", os.path.abspath(targetdir)) - + else: + privatedir_line = "private_dir = " + default_lp.get("private dir") + lockdir_line = "lock dir = " + default_lp.get("lock dir") + sysvol = os.path.join(default_lp.get("lock dir"), "sysvol") netlogon = os.path.join(sysvol, realm.lower(), "scripts") |