Build status as of Thu Apr 8 06:00:02 2010
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2010-04-07 00:00:12.0 -0600 +++ /home/build/master/cache/broken_results.txt 2010-04-08 00:00:29.0 -0600 @@ -1,4 +1,4 @@ -Build status as of Wed Apr 7 06:00:01 2010 +Build status as of Thu Apr 8 06:00:02 2010 Build counts: Tree Total Broken Panic @@ -14,9 +14,9 @@ samba-web0 0 0 samba_3_current 27 26 2 samba_3_master 27 27 2 -samba_3_next 27 25 3 -samba_4_0_test 29 29 0 -samba_4_0_waf 27 27 1 +samba_3_next 27 24 1 +samba_4_0_test 29 28 0 +samba_4_0_waf 27 27 0 talloc 29 10 0 tdb 27 17 0
SMB2 oplocks
Hi Jeremy, - Log - commit 3413cf7a6bd992fa722cc9674176beb15446502b Author: Jeremy Allison j...@samba.org Date: Wed Apr 7 19:00:44 2010 -0700 Start to plumb smb2 into the oplock system. Calls dummy functions for now. Do you noticed that smbd_smb2_send_oplock_break() already exists and you just have to call it from send_smb2_break_message()? metze signature.asc Description: OpenPGP digital signature
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f1aa4c3... tsocket_bsd: Always use a real length for the sa_socklen, and keep it around via 0922c5a... Revert socket-wrapper: not all systems have FIONREAD defined from 3413cf7... Start to plumb smb2 into the oplock system. Calls dummy functions for now. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f1aa4c34bf0bd7d42627024af333963b741babea Author: Andrew Bartlett abart...@samba.org Date: Wed Apr 7 10:42:37 2010 +1000 tsocket_bsd: Always use a real length for the sa_socklen, and keep it around The previous code assumed the OS would happily accept sizeof(struct sockaddr_storage). It seems some versions of Solaris do not like this. Andrew Bartlett commit 0922c5ab2da1106fdb9a750c2d71d0cd04146394 Author: Stefan Metzmacher me...@samba.org Date: Wed Apr 7 15:21:32 2010 +0200 Revert socket-wrapper: not all systems have FIONREAD defined This reverts commit 710aa773d54509de34404f9992c5058ddfa45f3b. We rely on FIONREAD in a lot of other parts in the code, so there's no need to have an ifdef for it in the socket_wrapper code. On tru64 FIONREAD is defined in sys/ioctl.h and we include sys/ioctl.h via system/network.h. Tridge: maybe a HAVE_SYS_IOCTL_H was missing at the time you tried it on tru64? If we find a platform that doesn't support it, we need to bail out at configure time or provide a replacement in libreplace. metze --- Summary of changes: lib/socket_wrapper/socket_wrapper.c |2 - lib/tsocket/tsocket_bsd.c | 84 +++ 2 files changed, 16 insertions(+), 70 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c index c7530c9..9d732ee 100644 --- a/lib/socket_wrapper/socket_wrapper.c +++ b/lib/socket_wrapper/socket_wrapper.c @@ -2002,7 +2002,6 @@ _PUBLIC_ int swrap_ioctl(int s, int r, void *p) ret = real_ioctl(s, r, p); -#ifdef FIONREAD switch (r) { case FIONREAD: value = *((int *)p); @@ -2013,7 +2012,6 @@ _PUBLIC_ int swrap_ioctl(int s, int r, void *p) } break; } -#endif return ret; } diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c index 1a7a4ee..220924c 100644 --- a/lib/tsocket/tsocket_bsd.c +++ b/lib/tsocket/tsocket_bsd.c @@ -190,6 +190,7 @@ static ssize_t tsocket_bsd_pending(int fd) static const struct tsocket_address_ops tsocket_address_bsd_ops; struct tsocket_address_bsd { + socklen_t sa_socklen; union { struct sockaddr sa; struct sockaddr_in in; @@ -261,6 +262,8 @@ int _tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx, memcpy(bsda-u.ss, sa, sa_socklen); + bsda-sa_socklen = sa_socklen; + *_addr = addr; return 0; } @@ -271,42 +274,24 @@ ssize_t tsocket_address_bsd_sockaddr(const struct tsocket_address *addr, { struct tsocket_address_bsd *bsda = talloc_get_type(addr-private_data, struct tsocket_address_bsd); - ssize_t rlen = 0; if (!bsda) { errno = EINVAL; return -1; } - switch (bsda-u.sa.sa_family) { - case AF_UNIX: - rlen = sizeof(struct sockaddr_un); - break; - case AF_INET: - rlen = sizeof(struct sockaddr_in); - break; -#ifdef HAVE_IPV6 - case AF_INET6: - rlen = sizeof(struct sockaddr_in6); - break; -#endif - default: - errno = EAFNOSUPPORT; - return -1; - } - - if (sa_socklen rlen) { + if (sa_socklen bsda-sa_socklen) { errno = EINVAL; return -1; } - if (sa_socklen sizeof(struct sockaddr_storage)) { + if (sa_socklen bsda-sa_socklen) { memset(sa, 0, sa_socklen); - sa_socklen = sizeof(struct sockaddr_storage); + sa_socklen = bsda-sa_socklen; } memcpy(sa, bsda-u.ss, sa_socklen); - return rlen; + return sa_socklen; } int _tsocket_address_inet_from_strings(TALLOC_CTX *mem_ctx, @@ -588,7 +573,7 @@ static struct tsocket_address *tsocket_address_bsd_copy(const struct tsocket_add ret = _tsocket_address_bsd_from_sockaddr(mem_ctx, bsda-u.sa, -sizeof(bsda-u.ss), +bsda-sa_socklen, copy, location);
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ca74246... s3: Fix a typo from f1aa4c3... tsocket_bsd: Always use a real length for the sa_socklen, and keep it around http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ca74246b4b82f1f3716531ad9732c223b21dd8c7 Author: Volker Lendecke v...@samba.org Date: Thu Apr 8 10:40:40 2010 +0200 s3: Fix a typo --- Summary of changes: source3/VERSION |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/VERSION b/source3/VERSION index 51bb2b1..fcab12a 100644 --- a/source3/VERSION +++ b/source3/VERSION @@ -75,7 +75,7 @@ SAMBA_VERSION_IS_GIT_SNAPSHOT=yes # # # MAJOR.MINOR.RELEASE[...]-VENDOR_SUFFIX # # # -# Note the '-' is automaticaly added # +# Note the '-' is automatically added # # # # e.g. SAMBA_VERSION_VENDOR_SUFFIX=VendorVersion # # - CVS 3.0.0rc2-VendorVersion# -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-4-test updated
The branch, v3-4-test has been updated via c150cf2... Second part of fix for bug #7159 - client rpc_transport doesn't cope with bad server data returns. via 0223d59... First part of fix for bug #7159 - client rpc_transport doesn't cope with bad server data returns. from d232dd9... s3: Fix bug 7326 -- can't write with vfs_full_audit active http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log - commit c150cf25f1aa5f034baa08360d5be9b8b532b7cb Author: Jeremy Allison j...@samba.org Date: Fri Feb 19 14:24:17 2010 -0800 Second part of fix for bug #7159 - client rpc_transport doesn't cope with bad server data returns. If server returns zero on a NP read. Report pipe broken. Prevents client from looping if it thinks there should be more data. Jeremy. (cherry picked from commit 0055e33dbed0e81548464d01bcf864255bab3159) (cherry picked from commit f5ca9f84e9b511c2ba7a4280b1997daa441f9877) Signed-off-by: Stefan Metzmacher me...@samba.org commit 0223d59ea950c8180047fd5de6c85f92c4e37ad2 Author: Stefan Metzmacher me...@samba.org Date: Tue Apr 6 12:20:02 2010 +0200 First part of fix for bug #7159 - client rpc_transport doesn't cope with bad server data returns. Ensure that subreq is *always* talloc_free'd in the _done function, as it has an event timeout attached. If the read requests look longer than the cli-timeout, then the timeout fn is called with already freed data. Jeremy. (cherry picked from commit ad77ae1d5870e06f8587ecf634e0b6bdcbb950d7) (similar to commit 6e5b6b5acb30869eb63b25ed1406014101a5e89d) Signed-off-by: Stefan Metzmacher me...@samba.org --- Summary of changes: source3/rpc_client/rpc_transport_np.c | 10 ++ source3/rpc_client/rpc_transport_sock.c | 12 2 files changed, 22 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_client/rpc_transport_np.c b/source3/rpc_client/rpc_transport_np.c index 80ff384..4ea361b 100644 --- a/source3/rpc_client/rpc_transport_np.c +++ b/source3/rpc_client/rpc_transport_np.c @@ -159,6 +159,9 @@ static void rpc_np_read_done(struct async_req *subreq) NTSTATUS status; uint8_t *rcvbuf; + /* We must free subreq in this function as there is + a timer event attached to it. */ + status = cli_read_andx_recv(subreq, state-received, rcvbuf); /* * We can't TALLOC_FREE(subreq) as usual here, as rcvbuf still is a @@ -179,7 +182,14 @@ static void rpc_np_read_done(struct async_req *subreq) return; } + if (state-received == 0) { + TALLOC_FREE(subreq); + async_req_nterror(req, NT_STATUS_PIPE_BROKEN); + return; + } + memcpy(state-data, rcvbuf, state-received); + TALLOC_FREE(subreq); async_req_done(req); } diff --git a/source3/rpc_client/rpc_transport_sock.c b/source3/rpc_client/rpc_transport_sock.c index b1d9d8f..7115dc4 100644 --- a/source3/rpc_client/rpc_transport_sock.c +++ b/source3/rpc_client/rpc_transport_sock.c @@ -76,11 +76,17 @@ static void rpc_sock_read_done(struct tevent_req *subreq) req-private_data, struct rpc_sock_read_state); int err; + /* We must free subreq in this function as there is + a timer event attached to it. */ + state-received = async_recv_recv(subreq, err); + if (state-received == -1) { + TALLOC_FREE(subreq); async_req_nterror(req, map_nt_error_from_unix(err)); return; } + TALLOC_FREE(subreq); async_req_done(req); } @@ -137,11 +143,17 @@ static void rpc_sock_write_done(struct tevent_req *subreq) req-private_data, struct rpc_sock_write_state); int err; + /* We must free subreq in this function as there is + a timer event attached to it. */ + state-sent = async_send_recv(subreq, err); + if (state-sent == -1) { + TALLOC_FREE(subreq); async_req_nterror(req, map_nt_error_from_unix(err)); return; } + TALLOC_FREE(subreq); async_req_done(req); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 479fd9c... s4-net: Simplify SamDB connect code. via 2578072... s4-python: Move set_global_schema to pydsdb. via a1e47e3... s4-waf: Add dist target. from ca74246... s3: Fix a typo http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 479fd9c03fc84824fea310b76d48ce271587cfe7 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 12:19:51 2010 +0200 s4-net: Simplify SamDB connect code. commit 2578072541e880c83089fdd278d81467e91ddc5a Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 03:26:39 2010 +0200 s4-python: Move set_global_schema to pydsdb. commit a1e47e3dd2beb0c46bfc90095b066ffd64706529 Author: Jelmer Vernooij jel...@samba.org Date: Wed Apr 7 23:57:23 2010 +0200 s4-waf: Add dist target. --- Summary of changes: buildtools/scripts/Makefile.waf|3 + source4/dsdb/pydsdb.c | 139 +++- source4/scripting/python/pyglue.c | 18 --- .../scripting/python/samba/netcmd/domainlevel.py |7 +- source4/scripting/python/samba/netcmd/dsacl.py | 10 +- .../scripting/python/samba/netcmd/enableaccount.py |7 +- source4/scripting/python/samba/netcmd/fsmo.py |7 +- source4/scripting/python/samba/netcmd/newuser.py |7 +- .../scripting/python/samba/netcmd/pwsettings.py|7 +- source4/scripting/python/samba/netcmd/setexpiry.py |7 +- .../scripting/python/samba/netcmd/setpassword.py |7 +- source4/scripting/python/samba/samdb.py|2 +- 12 files changed, 118 insertions(+), 103 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/scripts/Makefile.waf b/buildtools/scripts/Makefile.waf index 4fb9fd2..78cd0e1 100644 --- a/buildtools/scripts/Makefile.waf +++ b/buildtools/scripts/Makefile.waf @@ -22,6 +22,9 @@ test: quicktest: $(WAF) test --quick $(if $(TESTS),--tests=$(TESTS)) +dist: + $(WAF) dist + clean: $(WAF) clean diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index b18c127..cc75472 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -33,6 +33,25 @@ } */\ ldb = PyLdb_AsLdbContext(py_ldb); +static PyObject *py_ldb_get_exception(void) +{ + PyObject *mod = PyImport_ImportModule(ldb); + if (mod == NULL) + return NULL; + + return PyObject_GetAttrString(mod, LdbError); +} + +static void PyErr_SetLdbError(PyObject *error, int ret, struct ldb_context *ldb_ctx) +{ + if (ret == LDB_ERR_PYTHON_EXCEPTION) + return; /* Python exception should already be set, just keep that */ + + PyErr_SetObject(error, + Py_BuildValue(discard_const_p(char, (i,s)), ret, + ldb_ctx == NULL?ldb_strerror(ret):ldb_errstring(ldb_ctx))); +} + static PyObject *py_samdb_server_site_name(PyObject *self, PyObject *args) { PyObject *py_ldb, *result; @@ -216,6 +235,21 @@ static PyObject *py_samdb_ntds_objectGUID(PyObject *self, PyObject *args) return result; } +static PyObject *py_dsdb_set_global_schema(PyObject *self, PyObject *args) +{ + PyObject *py_ldb; + struct ldb_context *ldb; + int ret; + if (!PyArg_ParseTuple(args, O, py_ldb)) + return NULL; + + PyErr_LDB_OR_RAISE(py_ldb, ldb); + + ret = dsdb_set_global_schema(ldb); + PyErr_LDB_ERROR_IS_ERR_RAISE(py_ldb_get_exception(), ret, ldb); + + Py_RETURN_NONE; +} static PyMethodDef py_dsdb_methods[] = { { samdb_server_site_name, (PyCFunction)py_samdb_server_site_name, @@ -234,10 +268,13 @@ static PyMethodDef py_dsdb_methods[] = { Get SID of domain in use. }, { samdb_ntds_invocation_id, (PyCFunction)py_samdb_ntds_invocation_id, METH_VARARGS, get the NTDS invocation ID GUID as a string}, - { dsdb_set_ntds_invocation_id, (PyCFunction)py_dsdb_set_ntds_invocation_id, METH_VARARGS, + { dsdb_set_ntds_invocation_id, + (PyCFunction)py_dsdb_set_ntds_invocation_id, METH_VARARGS, NULL }, - { samdb_ntds_objectGUID, (PyCFunction)py_samdb_ntds_objectGUID, METH_VARARGS, - get the NTDS objectGUID as a string}, + { samdb_ntds_objectGUID, (PyCFunction)py_samdb_ntds_objectGUID, + METH_VARARGS, get the NTDS objectGUID as a string}, + { dsdb_set_global_schema, (PyCFunction)py_dsdb_set_global_schema, + METH_VARARGS, NULL }, { NULL } }; @@ -251,44 +288,76 @@ void initdsdb(void) return; /* userAccountControl flags */ - PyModule_AddObject(m, UF_NORMAL_ACCOUNT, PyInt_FromLong(UF_NORMAL_ACCOUNT)); - PyModule_AddObject(m, UF_TEMP_DUPLICATE_ACCOUNT,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e2aec9d... s4:registry - patchfile_preg.c - fix the read operation of the data length on big-endian platforms via 2164ba5... s4:registry - patchfile_preg.c - use sizeof(uint32_t) for some size specifications from 479fd9c... s4-net: Simplify SamDB connect code. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e2aec9d81f53ae80bc7561fa83e88df668998a1a Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de Date: Thu Apr 8 12:25:34 2010 +0200 s4:registry - patchfile_preg.c - fix the read operation of the data length on big-endian platforms commit 2164ba51e299dd2f2829620d5616cd04a0a837f4 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de Date: Thu Apr 8 12:20:51 2010 +0200 s4:registry - patchfile_preg.c - use sizeof(uint32_t) for some size specifications Looks nicer. --- Summary of changes: source4/lib/registry/patchfile_preg.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/lib/registry/patchfile_preg.c b/source4/lib/registry/patchfile_preg.c index c75b08d..c68fb98 100644 --- a/source4/lib/registry/patchfile_preg.c +++ b/source4/lib/registry/patchfile_preg.c @@ -120,7 +120,7 @@ static WERROR reg_preg_diff_del_value(void *_data, const char *key_name, blob.data = (uint8_t *)talloc(data-ctx, uint32_t); W_ERROR_HAVE_NO_MEMORY(blob.data); SIVAL(blob.data, 0, 0); - blob.length = 4; + blob.length = sizeof(uint32_t); werr = reg_preg_diff_set_value(data, key_name, val, REG_DWORD, blob); @@ -139,7 +139,7 @@ static WERROR reg_preg_diff_del_all_values(void *_data, const char *key_name) blob.data = (uint8_t *)talloc(data-ctx, uint32_t); W_ERROR_HAVE_NO_MEMORY(blob.data); SIVAL(blob.data, 0, 0); - blob.length = 4; + blob.length = sizeof(uint32_t); werr = reg_preg_diff_set_value(data, key_name, **DelVals., REG_DWORD, blob); @@ -291,12 +291,15 @@ _PUBLIC_ WERROR reg_preg_diff_load(int fd, ret = WERR_GENERAL_FAILURE; goto cleanup; } + /* Get data length */ if (read(fd, length, 4) 4) { DEBUG(0, (Error while reading PReg\n)); ret = WERR_GENERAL_FAILURE; goto cleanup; } + length = IVAL(length, 0); + /* Read past delimiter */ buf_ptr = buf; if (!(W_ERROR_IS_OK(preg_read_utf16(fd, buf_ptr)) @@ -305,6 +308,7 @@ _PUBLIC_ WERROR reg_preg_diff_load(int fd, ret = WERR_GENERAL_FAILURE; goto cleanup; } + /* Get the data */ buf_ptr = buf; if (length buf_size -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via eb9b7d0... s3:winbindd: make smbcontrol winbindd validate-cache reliable again from e2aec9d... s4:registry - patchfile_preg.c - fix the read operation of the data length on big-endian platforms http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit eb9b7d0363669574de8ec380089407890f15eac2 Author: Stefan Metzmacher me...@samba.org Date: Thu Apr 8 12:45:54 2010 +0200 s3:winbindd: make smbcontrol winbindd validate-cache reliable again commit 73577205cf81644e7fe853eaf3e6459f7f443096 (s3:winbindd: fix problems with SIGCHLD handling (bug #7317)) broke this. metze --- Summary of changes: source3/winbindd/winbindd.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index ab70116..a7f3a60 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -426,6 +426,9 @@ static void winbind_msg_validate_cache(struct messaging_context *msg_ctx, _exit(0); } + /* install default SIGCHLD handler: validation code uses fork/waitpid */ + CatchSignal(SIGCHLD, SIG_DFL); + ret = (uint8)winbindd_validate_cache_nobackup(); DEBUG(10, (winbindd_msg_validata_cache: got return value %d\n, ret)); messaging_send_buf(msg_ctx, server_id, MSG_WINBIND_VALIDATE_CACHE, ret, -- Samba Shared Repository
svn commit: samba-web r1416 - in trunk: .
Author: kseeger Date: 2010-04-08 05:37:48 -0600 (Thu, 08 Apr 2010) New Revision: 1416 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=1416 Log: Remove Samba 3.0 and 3.2 from the Historical section Karolin Modified: trunk/header_columns.html Changeset: Modified: trunk/header_columns.html === --- trunk/header_columns.html 2010-04-07 08:19:17 UTC (rev 1415) +++ trunk/header_columns.html 2010-04-08 11:37:48 UTC (rev 1416) @@ -124,7 +124,7 @@ lia href=/samba/history/samba-3.5.2.htmlRelease Notes/a/li lia href=/samba/ftp/stable/samba-3.5.2.tar.ascSignature/a/li /ul - + h4Historical/h4 ul lia href=/samba/ftp/stable/samba-3.4.7.tar.gzSamba 3.4.7 (gzipped)/a/li @@ -135,15 +135,6 @@ lia href=/samba/history/samba-3.3.12.htmlRelease Notes 3.3.12/a/li lia href=/samba/ftp/stable/samba-3.3.12.tar.ascSignature 3.3.12/a/li -lia href=/samba/ftp/stable/samba-3.2.15.tar.gzSamba 3.2.15 (gzipped)/a/li -lia href=/samba/history/samba-3.2.15.htmlRelease Notes 3.2.15/a/li -lia href=/samba/ftp/stable/samba-3.2.15.tar.ascSignature 3.2.15/a/li - -lia href=/samba/ftp/stable/samba-3.0.37.tar.gzSamba 3.0.37 (gzipped)/a/li -lia href=/samba/history/samba-3.0.37.htmlRelease Notes 3.0.37/a/li -lia href=/samba/ftp/stable/samba-3.0.37.tar.ascSignature 3.0.37/a/li -/ul - h4Maintenance/h4 ul lia href=/samba/patches/Patches/a/li
svn commit: samba-web r1417 - in trunk: .
Author: kseeger Date: 2010-04-08 05:50:48 -0600 (Thu, 08 Apr 2010) New Revision: 1417 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=1417 Log: Correctly point to the latest release Karolin Modified: trunk/index.html Changeset: Modified: trunk/index.html === --- trunk/index.html2010-04-08 11:37:48 UTC (rev 1416) +++ trunk/index.html2010-04-08 11:50:48 UTC (rev 1417) @@ -24,7 +24,7 @@ h2Latest News/h2 !--#include virtual=/samba/news/headlines.html -- -h407 April 2010/h4 +h4a name=latest07 April 2010/a/h4 p class=headlineSamba 3.5.2 Available for Download/p pThis is the latest stable release of the Samba 3.5 series/p @@ -36,7 +36,7 @@ is also available. See a href=/samba/history/samba-3.5.2.html the release notes for more info/a./p -h4a name=latest08 March 2010/a/h4 +h408 March 2010/h4 p class=headlineSamba 3.5.1 Available for Download/p pThis is a security release to address
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f3f8249... s4:WAF buildsystem - support out of source4 directory builds from bf4189e... build: we need this isinstance() check for distcheck http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f3f82496ac1198ffa65d5b2a052838248e0685aa Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de Date: Thu Apr 8 12:38:17 2010 +0200 s4:WAF buildsystem - support out of source4 directory builds Bug: https://bugzilla.samba.org/show_bug.cgi?id=4081 With this patch we are able to invoke s4 builds from the outside of the source4 directory (but the target remains the source4/bin path). One constraint: all commands: autogen-waf.sh, configure, make have to be run from the same directory! Regarding make: you have to run it using make -C source4 path [targets] if the invoke directory is not source4 itself. --- Summary of changes: buildtools/scripts/configure.waf |3 +++ source4/autogen-waf.sh | 22 ++ 2 files changed, 17 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/scripts/configure.waf b/buildtools/scripts/configure.waf index a6367e7..79a7a35 100755 --- a/buildtools/scripts/configure.waf +++ b/buildtools/scripts/configure.waf @@ -1,5 +1,6 @@ #!/bin/sh +PREVPATH=`dirname $0` WAF=BUILDTOOLS/bin/waf @@ -8,4 +9,6 @@ WAF=BUILDTOOLS/bin/waf JOBS=1 export JOBS +cd BUILDPATH $WAF configure $* +cd $PREVPATH diff --git a/source4/autogen-waf.sh b/source4/autogen-waf.sh index 9cb144a..a3aa979 100755 --- a/source4/autogen-waf.sh +++ b/source4/autogen-waf.sh @@ -1,22 +1,28 @@ #!/bin/sh +p=`dirname $0` + echo Setting up for waf build echo Looking for the buildtools directory d=buildtools -while test \! -d $d; do d=../$d; done +while test \! -d $p/$d; do d=../$d; done -echo Found buildtools in $d +echo Found buildtools in $p/$d echo Setting up configure -rm -f configure -sed s|BUILDTOOLS|$d|g $d/scripts/configure.waf configure -chmod +x configure +rm -f $p/configure +sed s|BUILDTOOLS|$d|g;s|BUILDPATH|$p|g $p/$d/scripts/configure.waf $p/configure +chmod +x $p/configure echo Setting up makefile # this relies on the fact that make looks for 'makefile' before 'Makefile' -rm -f makefile -sed s|BUILDTOOLS|$d|g $d/scripts/Makefile.waf makefile +rm -f $p/makefile +sed s|BUILDTOOLS|$d|g $p/$d/scripts/Makefile.waf $p/makefile -echo done. Now run ./configure or ./configure.developer then make +echo done. Now run $p/configure or $p/configure.developer then make. +if [ $p != . ]; then + echo Notice: The build invoke path is not 'source4'! Use make with the parameter + echo -C 'source4' path. Example: make -C source4 all +fi -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 16deed7... s4-smbtorture: add PrinterInfo level 2 / winreg consistency test. via f87a18e... s4-smbtorture: minor cleanup, use data_blob_talloc_zero() in RPC-SPOOLSS. from f3f8249... s4:WAF buildsystem - support out of source4 directory builds http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 16deed7199b837f2d8982045edbdae4e3af13afa Author: Günther Deschner g...@samba.org Date: Thu Apr 8 15:00:34 2010 +0200 s4-smbtorture: add PrinterInfo level 2 / winreg consistency test. This compares PrinterInfo2 with contents of HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\printername and HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers\printername Guenther commit f87a18ec3b3217cf1ba1706fed49b4f77d6a9815 Author: Günther Deschner g...@samba.org Date: Thu Apr 8 11:56:27 2010 +0200 s4-smbtorture: minor cleanup, use data_blob_talloc_zero() in RPC-SPOOLSS. Guenther --- Summary of changes: source4/torture/rpc/spoolss.c | 245 ++--- 1 files changed, 205 insertions(+), 40 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index d46780b..9a647f7 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -42,6 +42,7 @@ #define TOP_LEVEL_PRINT_PRINTERS_KEY TOP_LEVEL_PRINT_KEY \\Printers #define TOP_LEVEL_CONTROL_KEY SYSTEM\\CurrentControlSet\\Control\\Print #define TOP_LEVEL_CONTROL_FORMS_KEY TOP_LEVEL_CONTROL_KEY \\Forms +#define TOP_LEVEL_CONTROL_PRINTERS_KEY TOP_LEVEL_CONTROL_KEY \\Printers struct test_spoolss_context { /* print server handle */ @@ -264,8 +265,7 @@ static bool test_EnumPorts(struct torture_context *tctx, torture_assert_werr_equal(tctx, r.out.result, WERR_INSUFFICIENT_BUFFER, EnumPorts unexpected return code); - blob = data_blob_talloc(ctx, NULL, needed); - data_blob_clear(blob); + blob = data_blob_talloc_zero(ctx, needed); r.in.buffer = blob; r.in.offered = needed; @@ -358,8 +358,7 @@ static bool test_GetPrintProcessorDirectory(struct torture_context *tctx, torture_assert_werr_equal(tctx, r.out.result, WERR_INSUFFICIENT_BUFFER, GetPrintProcessorDirectory unexpected return code); - blob = data_blob_talloc(tctx, NULL, needed); - data_blob_clear(blob); + blob = data_blob_talloc_zero(tctx, needed); r.in.buffer = blob; r.in.offered = needed; @@ -424,8 +423,7 @@ static bool test_GetPrinterDriverDirectory(struct torture_context *tctx, torture_assert_werr_equal(tctx, r.out.result, WERR_INSUFFICIENT_BUFFER, GetPrinterDriverDirectory unexpected return code); - blob = data_blob_talloc(tctx, NULL, needed); - data_blob_clear(blob); + blob = data_blob_talloc_zero(tctx, needed); r.in.buffer = blob; r.in.offered = needed; @@ -481,8 +479,7 @@ static bool test_EnumPrinterDrivers(struct torture_context *tctx, continue; } if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { - blob = data_blob_talloc(ctx, NULL, needed); - data_blob_clear(blob); + blob = data_blob_talloc_zero(ctx, needed); r.in.buffer = blob; r.in.offered = needed; @@ -625,8 +622,7 @@ static bool test_EnumMonitors(struct torture_context *tctx, torture_assert_werr_equal(tctx, r.out.result, WERR_INSUFFICIENT_BUFFER, EnumMonitors failed); - blob = data_blob_talloc(ctx, NULL, needed); - data_blob_clear(blob); + blob = data_blob_talloc_zero(ctx, needed); r.in.buffer = blob; r.in.offered = needed; @@ -704,8 +700,7 @@ static bool test_EnumPrintProcessors(struct torture_context *tctx, torture_assert_werr_equal(tctx, r.out.result, WERR_INSUFFICIENT_BUFFER, EnumPrintProcessors unexpected return code); - blob = data_blob_talloc(ctx, NULL, needed); - data_blob_clear(blob); + blob = data_blob_talloc_zero(ctx, needed); r.in.buffer = blob; r.in.offered = needed; @@ -780,8 +775,7 @@ static bool test_EnumPrintProcDataTypes(struct torture_context *tctx, torture_assert_werr_equal(tctx, r.out.result, WERR_INSUFFICIENT_BUFFER,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3d5732f... s3: Remove the separate child argument from setup_domain_child() from 16deed7... s4-smbtorture: add PrinterInfo level 2 / winreg consistency test. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3d5732fc1392740c5147c39116e5853452d0dc54 Author: Volker Lendecke v...@samba.org Date: Wed Apr 7 17:50:19 2010 +0200 s3: Remove the separate child argument from setup_domain_child() --- Summary of changes: source3/winbindd/winbindd_domain.c |5 ++--- source3/winbindd/winbindd_proto.h |3 +-- source3/winbindd/winbindd_util.c | 15 +-- 3 files changed, 8 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/winbindd_domain.c b/source3/winbindd/winbindd_domain.c index 2cb6e31..4689b5f 100644 --- a/source3/winbindd/winbindd_domain.c +++ b/source3/winbindd/winbindd_domain.c @@ -79,9 +79,8 @@ static const struct winbindd_child_dispatch_table domain_dispatch_table[] = { } }; -void setup_domain_child(struct winbindd_domain *domain, - struct winbindd_child *child) +void setup_domain_child(struct winbindd_domain *domain) { - setup_child(domain, child, domain_dispatch_table, + setup_child(domain, domain-child, domain_dispatch_table, log.wb, domain-name); } diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h index 255e79e..d481380 100644 --- a/source3/winbindd/winbindd_proto.h +++ b/source3/winbindd/winbindd_proto.h @@ -253,8 +253,7 @@ NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain, /* The following definitions come from winbindd/winbindd_domain.c */ -void setup_domain_child(struct winbindd_domain *domain, - struct winbindd_child *child); +void setup_domain_child(struct winbindd_domain *domain); /* The following definitions come from winbindd/winbindd_dual.c */ diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 3e03f40..84522ea 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -352,8 +352,7 @@ static void trustdom_recv(void *private_data, bool success) cache_methods, sid); if (domain) { - setup_domain_child(domain, - domain-child); + setup_domain_child(domain); } } p=q; @@ -609,8 +608,7 @@ bool init_domain_list(void) domain = add_trusted_domain(BUILTIN, NULL, builtin_passdb_methods, global_sid_Builtin); if (domain) { - setup_domain_child(domain, - domain-child); + setup_domain_child(domain); } /* Local SAM */ @@ -621,8 +619,7 @@ bool init_domain_list(void) if ( role != ROLE_DOMAIN_MEMBER ) { domain-primary = True; } - setup_domain_child(domain, - domain-child); + setup_domain_child(domain); } /* Add ourselves as the first entry. */ @@ -639,8 +636,7 @@ bool init_domain_list(void) cache_methods, our_sid); if (domain) { domain-primary = True; - setup_domain_child(domain, - domain-child); + setup_domain_child(domain); /* Even in the parent winbindd we'll need to talk to the DC, so try and see if we can @@ -691,8 +687,7 @@ void check_domain_trusted( const char *name, const DOM_SID *user_sid ) domain-internal = False; domain-online = True; - setup_domain_child(domain, - domain-child); + setup_domain_child(domain); wcache_tdc_add_domain( domain ); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ef3490e... s4:registry - REGF backend - don't ignore wrong-sized REG_DWORD/REG_DWORD_BIG_ENDIAN values from 3d5732f... s3: Remove the separate child argument from setup_domain_child() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ef3490e79959a3c4366f6981c67dbe5e529a3738 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de Date: Thu Apr 8 15:19:07 2010 +0200 s4:registry - REGF backend - don't ignore wrong-sized REG_DWORD/REG_DWORD_BIG_ENDIAN values --- Summary of changes: source4/lib/registry/regf.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c index 615389e..3888b8e 100644 --- a/source4/lib/registry/regf.c +++ b/source4/lib/registry/regf.c @@ -1822,8 +1822,11 @@ static WERROR regf_set_value(struct hive_key *key, const char *name, /* Set the type and data */ vk.data_length = data.length; vk.data_type = type; - if ((data.length == sizeof(uint32_t)) - ((type == REG_DWORD) || (type == REG_DWORD_BIG_ENDIAN))) { + if ((type == REG_DWORD) || (type == REG_DWORD_BIG_ENDIAN)) { + if (vk.data_length != sizeof(uint32_t)) { + DEBUG(0, (DWORD or DWORD_BIG_ENDIAN value with size other than 4 byte!\n)); + return WERR_NOT_SUPPORTED; + } vk.data_length |= 0x8000; vk.data_offset = IVAL(data.data, 0); } else { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1c4c4dd... s4-smbtorture: protect against full UNC paths in winreg printerinfo test. from ef3490e... s4:registry - REGF backend - don't ignore wrong-sized REG_DWORD/REG_DWORD_BIG_ENDIAN values http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1c4c4dd7e044f20c3de623b189a5c0d65b0a67b4 Author: Günther Deschner g...@samba.org Date: Thu Apr 8 16:09:36 2010 +0200 s4-smbtorture: protect against full UNC paths in winreg printerinfo test. Guenther --- Summary of changes: source4/torture/rpc/spoolss.c | 28 ++-- 1 files changed, 26 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 9a647f7..1f6153c 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -3843,6 +3843,26 @@ static bool test_GetForm_winreg(struct torture_context *tctx, return true; } +static const char *strip_unc(const char *unc) +{ + char *name; + + if (!unc) { + return NULL; + } + + if (unc[0] == '\\' unc[1] == '\\') { + unc +=2; + } + + name = strchr(unc, '\\'); + if (name) { + return name+1; + } + + return unc; +} + static bool test_GetPrinterInfo_winreg(struct torture_context *tctx, struct dcerpc_binding_handle *b, struct policy_handle *handle, @@ -3856,6 +3876,7 @@ static bool test_GetPrinterInfo_winreg(struct torture_context *tctx, TOP_LEVEL_PRINT_PRINTERS_KEY }; int i; + const char *printername, *sharename; torture_comment(tctx, Testing Printer Info and winreg consistency\n); @@ -3863,6 +3884,9 @@ static bool test_GetPrinterInfo_winreg(struct torture_context *tctx, test_GetPrinter_level(tctx, b, handle, 2, info), failed to get printer info level 2); + printername = strip_unc(info.info2.printername); + sharename = strip_unc(info.info2.sharename); + #define test_sz(key, wname, iname) \ do {\ DATA_BLOB blob;\ @@ -3960,8 +3984,8 @@ do {\ torture_assert(tctx, test_winreg_OpenKey(tctx, winreg_handle, hive_handle, printer_key, key_handle), ); - test_sz(keys[i], Name, info.info2.printername); - test_sz(keys[i], Share Name, info.info2.sharename); + test_sz(keys[i], Name, printername); + test_sz(keys[i], Share Name, sharename); test_sz(keys[i], Port, info.info2.portname); test_sz(keys[i], Printer Driver, info.info2.drivername); test_sz(keys[i], Description, info.info2.comment); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 84f3eee... s3-registry: fix fill_in_printer_values() for datatype and printprocessor. from 1c4c4dd... s4-smbtorture: protect against full UNC paths in winreg printerinfo test. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 84f3eeeca312cc9182785bb7c3b0e1c4db8b3480 Author: Günther Deschner g...@samba.org Date: Thu Apr 8 16:20:46 2010 +0200 s3-registry: fix fill_in_printer_values() for datatype and printprocessor. It is wise and good to enforce RAW and winprint, but we need to be consistent with spoolss (and enforce it there). Found by torture test. Guenther --- Summary of changes: source3/registry/reg_backend_printing.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/registry/reg_backend_printing.c b/source3/registry/reg_backend_printing.c index 278ad4f..26227b5 100644 --- a/source3/registry/reg_backend_printing.c +++ b/source3/registry/reg_backend_printing.c @@ -414,8 +414,8 @@ static void fill_in_printer_values(NT_PRINTER_INFO_LEVEL_2 *info2, struct regval regval_ctr_addvalue_sz(values, Share Name, info2-sharename); regval_ctr_addvalue_sz(values, Printer Driver, info2-drivername); regval_ctr_addvalue_sz(values, Separator File, info2-sepfile); - regval_ctr_addvalue_sz(values, Print Processor, WinPrint); - regval_ctr_addvalue_sz(values, Datatype, RAW); + regval_ctr_addvalue_sz(values, Print Processor, info2-printprocessor); + regval_ctr_addvalue_sz(values, Datatype, info2-datatype); /* stream the device mode */ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8d588e9... s3-lanman: use spoolss for api_RDosPrintJobDel(). via d5e2b43... s3-lanman: use spoolss for api_WPrintQueueCtrl(). from 84f3eee... s3-registry: fix fill_in_printer_values() for datatype and printprocessor. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8d588e96d964de5db171cfb666feb1dc2f744aad Author: Günther Deschner g...@samba.org Date: Thu Mar 18 19:19:28 2010 +0100 s3-lanman: use spoolss for api_RDosPrintJobDel(). Guenther commit d5e2b43176099abe433b07a763d8e4b3180d94eb Author: Günther Deschner g...@samba.org Date: Thu Mar 18 18:13:40 2010 +0100 s3-lanman: use spoolss for api_WPrintQueueCtrl(). Guenther --- Summary of changes: source3/smbd/lanman.c | 151 +--- 1 files changed, 129 insertions(+), 22 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index c97228f..b9d531f 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -28,7 +28,9 @@ #include includes.h #include smbd/globals.h #include ../librpc/gen_ndr/cli_samr.h +#include ../librpc/gen_ndr/cli_spoolss.h #include ../librpc/gen_ndr/srv_samr.h +#include ../librpc/gen_ndr/srv_spoolss.h #include ../lib/util/binsearch.h #ifdef CHECK_TYPES @@ -2965,11 +2967,17 @@ static bool api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *str2 = skip_string(param,tpscnt,str1); char *p = skip_string(param,tpscnt,str2); uint32 jobid; - int snum; fstring sharename; int errcode; WERROR werr = WERR_OK; + TALLOC_CTX *mem_ctx = talloc_tos(); + NTSTATUS status; + struct rpc_pipe_client *cli = NULL; + struct policy_handle handle; + struct spoolss_DevmodeContainer devmode_ctr; + enum spoolss_JobControl command; + if (!str1 || !str2 || !p) { return False; } @@ -2994,38 +3002,76 @@ static bool api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, } *rdata_len = 0; - if (!print_job_exists(sharename, jobid)) { - errcode = NERR_JobNotFound; + ZERO_STRUCT(handle); + + status = rpc_pipe_open_internal(mem_ctx, ndr_table_spoolss.syntax_id, + rpc_spoolss_dispatch, conn-server_info, + cli); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0,(api_RDosPrintJobDel: could not connect to spoolss: %s\n, + nt_errstr(status))); + errcode = W_ERROR_V(ntstatus_to_werror(status)); goto out; } - snum = lp_servicenumber( sharename); - if (snum == -1) { - errcode = NERR_DestNotFound; + ZERO_STRUCT(devmode_ctr); + + status = rpccli_spoolss_OpenPrinter(cli, mem_ctx, + sharename, + NULL, + devmode_ctr, + SEC_FLAG_MAXIMUM_ALLOWED, + handle, + werr); + if (!NT_STATUS_IS_OK(status)) { + errcode = W_ERROR_V(ntstatus_to_werror(status)); + goto out; + } + if (!W_ERROR_IS_OK(werr)) { + errcode = W_ERROR_V(werr); goto out; } - errcode = NERR_notsupported; + /* FIXME: formerly NERR_JobNotFound was returned if job did not exist +* and NERR_DestNotFound if share did not exist */ + + errcode = NERR_Success; switch (function) { - case 81:/* delete */ - if (print_job_delete(conn-server_info, snum, jobid, werr)) - errcode = NERR_Success; + case 81:/* delete */ + command = SPOOLSS_JOB_CONTROL_DELETE; break; case 82:/* pause */ - if (print_job_pause(conn-server_info, snum, jobid, werr)) - errcode = NERR_Success; + command = SPOOLSS_JOB_CONTROL_PAUSE; break; case 83:/* resume */ - if (print_job_resume(conn-server_info, snum, jobid, werr)) - errcode = NERR_Success; + command = SPOOLSS_JOB_CONTROL_RESUME; + break; + default: + errcode = NERR_notsupported; break; } - if (!W_ERROR_IS_OK(werr)) + status = rpccli_spoolss_SetJob(cli, mem_ctx, + handle, + jobid, +
Re: SMB2 oplocks
On Thu, Apr 08, 2010 at 08:42:15AM +0200, Stefan (metze) Metzmacher wrote: Hi Jeremy, - Log - commit 3413cf7a6bd992fa722cc9674176beb15446502b Author: Jeremy Allison j...@samba.org Date: Wed Apr 7 19:00:44 2010 -0700 Start to plumb smb2 into the oplock system. Calls dummy functions for now. Do you noticed that smbd_smb2_send_oplock_break() already exists and you just have to call it from send_smb2_break_message()? Yes, I did see it earlier, then forgot when doing the refactoring :-). I'm still working on the plumbing, so was more trying to get the hooks in the SMB1 code right before getting anything working. I still need to fix the delayed open issue in SMB2 when create returns NT_STATUS_SHARING_VIOLATION first. Once I've got the code right for that, adding the oplock work should be relatively easy. Thanks for the reminder :-) Jeremy.
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7f65f77... Update waf build. via cf17d48... Migrate 'net export keytab' to python. from 8d588e9... s3-lanman: use spoolss for api_RDosPrintJobDel(). http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7f65f77b4dfb5ee124992a34db4a92be4d728fb0 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 22:46:02 2010 +0200 Update waf build. commit cf17d48dec1ed94127b239c9bf40bcdcbcd808ca Author: Jelmer Vernooij jel...@samba.org Date: Mon Mar 1 20:43:19 2010 +0100 Migrate 'net export keytab' to python. --- Summary of changes: source4/libnet/py_net.c | 67 ++--- source4/scripting/python/samba/netcmd/__init__.py |2 + source4/scripting/python/samba/netcmd/export.py | 57 +++ source4/utils/net/config.mk |3 +- source4/utils/net/net.c |1 - source4/utils/net/net_export_keytab.c | 110 - source4/utils/net/wscript_build |2 +- 7 files changed, 116 insertions(+), 126 deletions(-) create mode 100644 source4/scripting/python/samba/netcmd/export.py delete mode 100644 source4/utils/net/net_export_keytab.c Changeset truncated at 500 lines: diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index e5ca5e1..7f799db 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -90,12 +90,12 @@ static PyObject *py_net_join(PyObject *cls, PyObject *args, PyObject *kwargs) talloc_free(mem_ctx); - if (result == NULL) - return NULL; - return result; } +static const char py_net_join_doc[] = join(domain_name, netbios_name, join_type, level) - (join_password, domain_sid, domain_name)\n\n \ +Join the domain with the specified name.; + static PyObject *py_net_set_password(PyObject *cls, PyObject *args, PyObject *kwargs) { union libnet_SetPassword r; @@ -109,7 +109,7 @@ static PyObject *py_net_set_password(PyObject *cls, PyObject *args, PyObject *kw r.generic.level = LIBNET_SET_PASSWORD_GENERIC; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, sssO:SetPassword, discard_const_p(char *, kwnames), + if (!PyArg_ParseTupleAndKeywords(args, kwargs, sssO:set_password, discard_const_p(char *, kwnames), r.generic.in.account_name, r.generic.in.domain_name, r.generic.in.newpassword, py_creds)) { return NULL; @@ -135,28 +135,72 @@ static PyObject *py_net_set_password(PyObject *cls, PyObject *args, PyObject *kw return NULL; } + talloc_free(mem_ctx); + Py_RETURN_NONE; } -static const char py_net_join_doc[] = join(domain_name, netbios_name, join_type, level) - (join_password, domain_sid, domain_name)\n\n \ -Join the domain with the specified name.; - -static const char py_net_set_password_doc[] = SetPassword(account_name, domain_name, newpassword) - True\n\n \ +static const char py_net_set_password_doc[] = set_password(account_name, domain_name, newpassword) - True\n\n \ Set password for a user. You must supply credential with enough rights to do this.\n\n \ Sample usage is:\n \ creds = samba.credentials.Credentials()\n \ creds.set_username('admin_user')\n \ creds.set_domain('domain_name')\n \ creds.set_password('pass')\n\n \ -net.SetPassword(account_name=account_name,\n \ +net.set_password(account_name=account_name,\n \ domain_name=creds.get_domain(),\n \ newpassword=new_pass,\n \ credentials=creds)\n; +static PyObject *py_net_export_keytab(PyObject *cls, PyObject *args, PyObject *kwargs) +{ + struct libnet_export_keytab r; + struct tevent_context *ev; + TALLOC_CTX *mem_ctx; + const char *kwnames[] = { keytab, creds, NULL }; + struct libnet_context *libnet_ctx; + PyObject *py_creds; + struct cli_credentials *creds; + NTSTATUS status; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, sO:export_keytab, discard_const_p(char *, kwnames), +r.in.keytab_name, py_creds)) { + return NULL; + } + + creds = cli_credentials_from_py_object(py_creds); + if (creds == NULL) { + PyErr_SetString(PyExc_TypeError, Expected credentials object); + return NULL; + } + + /* FIXME: we really need to get a context from the caller or we may end +* up with 2 event contexts */ + ev = s4_event_context_init(NULL); + mem_ctx = talloc_new(ev); + + libnet_ctx = py_net_ctx(cls, ev, creds); + + status = libnet_export_keytab(libnet_ctx, mem_ctx, r); + if (NT_STATUS_IS_ERR(status)) { +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5d5fc92... s4:dsdb - Handle INVALID_DN_SYNTAX from OpenLDAP in dsdb_module_load_partition_usn(). from 7f65f77... Update waf build. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5d5fc92c6942d0d2a03dfdf0c8fd17b575bae608 Author: Endi S. Dewata edew...@redhat.com Date: Sat Mar 27 21:46:27 2010 -0500 s4:dsdb - Handle INVALID_DN_SYNTAX from OpenLDAP in dsdb_module_load_partition_usn(). Signed-off-by: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de --- Summary of changes: source4/dsdb/samdb/ldb_modules/util.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c index 7ff5e16..e957774 100644 --- a/source4/dsdb/samdb/ldb_modules/util.c +++ b/source4/dsdb/samdb/ldb_modules/util.c @@ -675,7 +675,7 @@ int dsdb_module_load_partition_usn(struct ldb_module *module, struct ldb_dn *dn, ret = ldb_wait(req-handle, LDB_WAIT_ALL); } - if (ret == LDB_ERR_NO_SUCH_OBJECT) { + if (ret == LDB_ERR_NO_SUCH_OBJECT || ret == LDB_ERR_INVALID_DN_SYNTAX) { /* it hasn't been created yet, which means an implicit value of zero */ *uSN = 0; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7a6f1c7... s4-python: Fix formatting, use standard convention to call instance methods. via ae6d306... s4-python: Cancel transaction properly in case of exceptions, fix formatting. via 57ac0a6... s4-python: Move load_partition_usn to dsdb module. via dd4ef4e... s4-python: More cleanups. via a35d876... s4-python: rename samba.glue to samba._glue to indicate it's private. via cc6e2b8... s4-python: Fix formatting, import of FLG_NOSYNC. via d7a46ee... s4-python: Simplify code, improve formatting. via be4b688... s4-python: Remove obsolete and broken torture modules. via 19e1537... testr: Use waf test runner. via d0c2515... selftest: Add --filtered-subunit option. via ffb2449... selftest: Support --load-list option. via b59ba79... s4-waf: Support --load-list option. via 4f2d8d6... s4-python: samdb: Default to using global schema. from 5d5fc92... s4:dsdb - Handle INVALID_DN_SYNTAX from OpenLDAP in dsdb_module_load_partition_usn(). http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7a6f1c78429183bd22e4b3e82881ac3ce2e0a1a7 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 23:18:17 2010 +0200 s4-python: Fix formatting, use standard convention to call instance methods. commit ae6d306c68aeb79280a950409352c76bad4fcd33 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 22:14:50 2010 +0200 s4-python: Cancel transaction properly in case of exceptions, fix formatting. commit 57ac0a6042c368a72beca3b48d0ae7210a9c999b Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 22:07:42 2010 +0200 s4-python: Move load_partition_usn to dsdb module. commit dd4ef4e106d372cfadf7b47db8bf9dc25728b3bc Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 21:01:17 2010 +0200 s4-python: More cleanups. commit a35d876537eb301d75a254d9da97268d041da8d6 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 20:34:40 2010 +0200 s4-python: rename samba.glue to samba._glue to indicate it's private. commit cc6e2b8a819c6a1da4e6214be9607aab2de270bb Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 20:28:11 2010 +0200 s4-python: Fix formatting, import of FLG_NOSYNC. commit d7a46ee129c455cba95126e9c0f409522127894e Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 18:57:09 2010 +0200 s4-python: Simplify code, improve formatting. commit be4b68817544b87d12a1dcd7d8b5c5d778872418 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 18:53:14 2010 +0200 s4-python: Remove obsolete and broken torture modules. The functionality of these modules is already present in a more current form in other modules. commit 19e1537fdfce58e9ce1bbaa293be4d00f0e0fda1 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 16:49:24 2010 +0200 testr: Use waf test runner. commit d0c25157e9b96ce9855ecd632723423ea45ea8c0 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 16:48:33 2010 +0200 selftest: Add --filtered-subunit option. commit ffb2449a13504261d3c113fcd3891553ccd44ff1 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 16:16:15 2010 +0200 selftest: Support --load-list option. commit b59ba79b959955a43d6749fe9670229fbb2a679f Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 15:24:33 2010 +0200 s4-waf: Support --load-list option. commit 4f2d8d6ace81c03fb0ff181ccfb0f3c2e02e2c45 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 15:08:27 2010 +0200 s4-python: samdb: Default to using global schema. --- Summary of changes: selftest/selftest.pl | 46 ++- source4/.testr.conf|4 +- source4/dsdb/config.mk |2 +- source4/dsdb/pydsdb.c | 49 +++ source4/dsdb/wscript_build |2 +- source4/lib/ldb/pyldb.c|9 +- source4/lib/ldb/tests/python/acl.py|6 +- source4/lib/ldb/tests/python/deletetest.py |5 +- source4/lib/ldb/tests/python/urgent_replication.py | 56 ++-- source4/scripting/bin/samba_dnsupdate |9 +- source4/scripting/bin/upgradeprovision | 43 ++- source4/scripting/python/config.mk |8 +- source4/scripting/python/pyglue.c | 52 +--- source4/scripting/python/samba/__init__.py | 20 +- source4/scripting/python/samba/getopt.py |4 +- .../scripting/python/samba/netcmd/domainlevel.py | 10 +- source4/scripting/python/samba/netcmd/dsacl.py | 21 +- source4/scripting/python/samba/netcmd/fsmo.py | 20 +- source4/scripting/python/samba/netcmd/ntacl.py |3 +-
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 26d928e... s4-net: Convert 'net time' to python. via 0c6f434... net: Convert time command to python. via 6510b2c... s4-net: Use new Net() object in net export keytab. via 814e20e... pynet: Create a net class. from 7a6f1c7... s4-python: Fix formatting, use standard convention to call instance methods. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 26d928e9482725fe66db05f23af573fdea61a291 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 23:41:08 2010 +0200 s4-net: Convert 'net time' to python. commit 0c6f434b7bc0d9d4a8819a03815200966c92736e Author: Jelmer Vernooij jel...@samba.org Date: Mon Mar 1 22:33:01 2010 +0100 net: Convert time command to python. commit 6510b2cdd21c473bd146b7630d69d06342801cb1 Author: Jelmer Vernooij jel...@samba.org Date: Thu Apr 8 22:59:16 2010 +0200 s4-net: Use new Net() object in net export keytab. commit 814e20e7da60f0ec33dfea1d4d6dda1b653b818d Author: Jelmer Vernooij jel...@samba.org Date: Mon Mar 1 22:23:45 2010 +0100 pynet: Create a net class. --- Summary of changes: source4/auth/credentials/pycredentials.c | 23 ++- source4/auth/gensec/pygensec.c |2 +- source4/auth/pyauth.c |7 +- source4/lib/ldb-samba/pyldb.c |6 +- source4/lib/registry/pyregistry.c |4 +- source4/libnet/py_net.c| 218 source4/librpc/rpc/pyrpc.c |4 +- source4/param/provision.c |2 +- source4/param/pyparam.h|2 +- source4/param/pyparam_util.c |6 +- source4/scripting/python/pyglue.c |7 +- source4/scripting/python/samba/netcmd/__init__.py |2 + source4/scripting/python/samba/netcmd/export.py|6 +- .../python/samba/netcmd/{export.py = time.py} | 30 +-- source4/utils/net/config.mk|1 - source4/utils/net/net.c|1 - source4/utils/net/net_time.c | 78 --- source4/utils/net/wscript_build|2 +- source4/utils/tests/test_net.sh| 10 +- 19 files changed, 196 insertions(+), 215 deletions(-) copy source4/scripting/python/samba/netcmd/{export.py = time.py} (64%) delete mode 100644 source4/utils/net/net_time.c Changeset truncated at 500 lines: diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c index cd578a5..c5cca4f 100644 --- a/source4/auth/credentials/pycredentials.c +++ b/source4/auth/credentials/pycredentials.c @@ -197,14 +197,18 @@ static PyObject *py_creds_guess(py_talloc_Object *self, PyObject *args) { PyObject *py_lp_ctx = Py_None; struct loadparm_context *lp_ctx; + struct cli_credentials *creds; + + creds = PyCredentials_AsCliCredentials(self); + if (!PyArg_ParseTuple(args, |O, py_lp_ctx)) return NULL; - lp_ctx = lp_from_py_object(py_lp_ctx); + lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */ if (lp_ctx == NULL) return NULL; - cli_credentials_guess(PyCredentials_AsCliCredentials(self), lp_ctx); + cli_credentials_guess(creds, lp_ctx); Py_RETURN_NONE; } @@ -214,14 +218,18 @@ static PyObject *py_creds_set_machine_account(py_talloc_Object *self, PyObject * PyObject *py_lp_ctx = Py_None; struct loadparm_context *lp_ctx; NTSTATUS status; + struct cli_credentials *creds; + + creds = PyCredentials_AsCliCredentials(self); + if (!PyArg_ParseTuple(args, |O, py_lp_ctx)) return NULL; - lp_ctx = lp_from_py_object(py_lp_ctx); + lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */ if (lp_ctx == NULL) return NULL; - status = cli_credentials_set_machine_account(PyCredentials_AsCliCredentials(self), lp_ctx); + status = cli_credentials_set_machine_account(creds, lp_ctx); PyErr_NTSTATUS_IS_ERR_RAISE(status); Py_RETURN_NONE; @@ -255,17 +263,20 @@ static PyObject *py_creds_get_named_ccache(py_talloc_Object *self, PyObject *arg struct tevent_context *event_ctx; int ret; const char *error_string; + struct cli_credentials *creds; + + creds = PyCredentials_AsCliCredentials(self); if (!PyArg_ParseTuple(args, |Os, py_lp_ctx, ccache_name)) return NULL; - lp_ctx = lp_from_py_object(py_lp_ctx); + lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */ if (lp_ctx == NULL) return NULL;
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7c54ff5... s3: re-run make samba3-idl. via e7a1573... winreg: fill in some winreg IDL gaps. from 26d928e... s4-net: Convert 'net time' to python. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7c54ff5898b98e75c848dde84e1d1845ec0e3666 Author: Günther Deschner g...@samba.org Date: Thu Apr 8 23:47:04 2010 +0200 s3: re-run make samba3-idl. Guenther commit e7a157317a1cec363efa084cfa3d40555604568d Author: Günther Deschner g...@samba.org Date: Thu Apr 8 23:46:15 2010 +0200 winreg: fill in some winreg IDL gaps. Guenther --- Summary of changes: librpc/gen_ndr/cli_winreg.c | 46 - librpc/gen_ndr/cli_winreg.h | 26 +++- librpc/gen_ndr/ndr_winreg.c | 155 +++ librpc/gen_ndr/winreg.h | 19 + librpc/idl/winreg.idl | 16 - 5 files changed, 253 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/gen_ndr/cli_winreg.c b/librpc/gen_ndr/cli_winreg.c index 0afc00c..8ca72a9 100644 --- a/librpc/gen_ndr/cli_winreg.c +++ b/librpc/gen_ndr/cli_winreg.c @@ -2932,7 +2932,11 @@ static void rpccli_winreg_ReplaceKey_done(struct tevent_req *subreq); struct tevent_req *rpccli_winreg_ReplaceKey_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, -struct rpc_pipe_client *cli) +struct rpc_pipe_client *cli, +struct policy_handle *_handle /* [in] [ref] */, +struct winreg_String *_subkey /* [in] [ref] */, +struct winreg_String *_new_file /* [in] [ref] */, +struct winreg_String *_old_file /* [in] [ref] */) { struct tevent_req *req; struct rpccli_winreg_ReplaceKey_state *state; @@ -2947,6 +2951,10 @@ struct tevent_req *rpccli_winreg_ReplaceKey_send(TALLOC_CTX *mem_ctx, state-dispatch_recv = cli-dispatch_recv; /* In parameters */ + state-orig.in.handle = _handle; + state-orig.in.subkey = _subkey; + state-orig.in.new_file = _new_file; + state-orig.in.old_file = _old_file; /* Out parameters */ @@ -3025,12 +3033,20 @@ NTSTATUS rpccli_winreg_ReplaceKey_recv(struct tevent_req *req, NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + struct policy_handle *handle /* [in] [ref] */, + struct winreg_String *subkey /* [in] [ref] */, + struct winreg_String *new_file /* [in] [ref] */, + struct winreg_String *old_file /* [in] [ref] */, WERROR *werror) { struct winreg_ReplaceKey r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.subkey = subkey; + r.in.new_file = new_file; + r.in.old_file = old_file; status = cli-dispatch(cli, mem_ctx, @@ -3663,7 +3679,9 @@ static void rpccli_winreg_UnLoadKey_done(struct tevent_req *subreq); struct tevent_req *rpccli_winreg_UnLoadKey_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, - struct rpc_pipe_client *cli) + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_subkey /* [in] [ref] */) { struct tevent_req *req; struct rpccli_winreg_UnLoadKey_state *state; @@ -3678,6 +3696,8 @@ struct tevent_req *rpccli_winreg_UnLoadKey_send(TALLOC_CTX *mem_ctx, state-dispatch_recv = cli-dispatch_recv; /* In parameters */ + state-orig.in.handle = _handle; + state-orig.in.subkey = _subkey; /* Out parameters */ @@ -3756,12 +3776,16 @@ NTSTATUS rpccli_winreg_UnLoadKey_recv(struct tevent_req *req, NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, +struct policy_handle *handle /* [in] [ref] */, +struct winreg_String *subkey /* [in] [ref] */, WERROR *werror) { struct winreg_UnLoadKey r; NTSTATUS status; /* In parameters */ + r.in.handle = handle; + r.in.subkey = subkey;
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0a154b9... s4:registry - patchfile_preg.c - assign a better type to the i counter variable via aa9e782... s4:registry - patchfile_preg.c - make a SIVAL statement nicer from 7c54ff5... s3: re-run make samba3-idl. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0a154b940dc5657f78e3fe10fc239ed0b46c2eaa Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de Date: Thu Apr 8 23:43:50 2010 +0200 s4:registry - patchfile_preg.c - assign a better type to the i counter variable The i variable sums up size values which are of type size_t. Therefore also i itself should be from this type. commit aa9e782a4d27600096230be44e0e18971e503e20 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de Date: Thu Apr 8 23:42:23 2010 +0200 s4:registry - patchfile_preg.c - make a SIVAL statement nicer --- Summary of changes: source4/lib/registry/patchfile_preg.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/lib/registry/patchfile_preg.c b/source4/lib/registry/patchfile_preg.c index c68fb98..eb84b56 100644 --- a/source4/lib/registry/patchfile_preg.c +++ b/source4/lib/registry/patchfile_preg.c @@ -42,8 +42,7 @@ static WERROR preg_read_utf16(int fd, char *c) static WERROR preg_write_utf16(int fd, const char *string) { codepoint_t v; - uint16_t i; - size_t size; + size_t i, size; for (i = 0; i strlen(string); i+=size) { v = next_codepoint(string[i], size); @@ -186,7 +185,7 @@ _PUBLIC_ WERROR reg_preg_diff_save(TALLOC_CTX *ctx, const char *filename, } strncpy(preg_header.hdr, PReg, 4); - SIVAL(preg_header, 4, 1); + SIVAL(preg_header.version, 0, 1); write(data-fd, (uint8_t *)preg_header,8); data-ctx = ctx; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8468137... s4-winreg: add winreg_DeleteKeyEx stub. via ffcaa73... s3-winreg: add winreg_DeleteKeyEx stub. via e42d5b5... s3: re-run make samba3-idl. via dc4bf56... winreg: add IDL for winreg_DeleteKeyEx. from 0a154b9... s4:registry - patchfile_preg.c - assign a better type to the i counter variable http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 846813797d3bba612492a5600cbe638388760ccf Author: Günther Deschner g...@samba.org Date: Fri Apr 9 00:11:57 2010 +0200 s4-winreg: add winreg_DeleteKeyEx stub. Guenther commit ffcaa7328079b45e2a137e637b686aa2edb4219b Author: Günther Deschner g...@samba.org Date: Fri Apr 9 00:11:41 2010 +0200 s3-winreg: add winreg_DeleteKeyEx stub. Guenther commit e42d5b5ae3da7d7a32428c50c8f518eab2dfbf30 Author: Günther Deschner g...@samba.org Date: Fri Apr 9 00:11:00 2010 +0200 s3: re-run make samba3-idl. Guenther commit dc4bf5651ee466397ab51cacaf83b519b79da5f1 Author: Günther Deschner g...@samba.org Date: Fri Apr 9 00:10:07 2010 +0200 winreg: add IDL for winreg_DeleteKeyEx. Guenther --- Summary of changes: librpc/gen_ndr/cli_winreg.c| 150 librpc/gen_ndr/cli_winreg.h| 17 librpc/gen_ndr/ndr_winreg.c| 89 +++- librpc/gen_ndr/ndr_winreg.h|5 +- librpc/gen_ndr/srv_winreg.c| 80 + librpc/gen_ndr/srv_winreg.h|2 + librpc/gen_ndr/winreg.h| 15 +++ librpc/idl/winreg.idl |9 ++ source3/rpc_server/srv_winreg_nt.c | 12 +++ source4/rpc_server/winreg/rpc_winreg.c |9 ++ 10 files changed, 386 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/gen_ndr/cli_winreg.c b/librpc/gen_ndr/cli_winreg.c index 8ca72a9..57e78a7 100644 --- a/librpc/gen_ndr/cli_winreg.c +++ b/librpc/gen_ndr/cli_winreg.c @@ -5490,3 +5490,153 @@ NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_DeleteKeyEx_state { + struct winreg_DeleteKeyEx orig; + struct winreg_DeleteKeyEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_DeleteKeyEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_DeleteKeyEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_key /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + uint32_t _reserved /* [in] */) +{ + struct tevent_req *req; + struct rpccli_winreg_DeleteKeyEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, state, + struct rpccli_winreg_DeleteKeyEx_state); + if (req == NULL) { + return NULL; + } + state-out_mem_ctx = NULL; + state-dispatch_recv = cli-dispatch_recv; + + /* In parameters */ + state-orig.in.handle = _handle; + state-orig.in.key = _key; + state-orig.in.access_mask = _access_mask; + state-orig.in.reserved = _reserved; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state-orig.out.result); + + /* make a temporary copy, that we pass to the dispatch function */ + state-tmp = state-orig; + + subreq = cli-dispatch_send(state, ev, cli, + ndr_table_winreg, + NDR_WINREG_DELETEKEYEX, + state-tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_DeleteKeyEx_done, req); + return req; +} + +static void rpccli_winreg_DeleteKeyEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_DeleteKeyEx_state *state = tevent_req_data( + req, struct rpccli_winreg_DeleteKeyEx_state); + NTSTATUS status; + TALLOC_CTX *mem_ctx; + + if (state-out_mem_ctx) { + mem_ctx = state-out_mem_ctx; + } else { + mem_ctx = state; + } + + status =
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8126c78... s4/torture: Suppress Valgrind warnings from 8468137... s4-winreg: add winreg_DeleteKeyEx stub. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8126c78c76965fe6158fb8ef426abf256551e725 Author: Kamen Mazdrashki kame...@samba.org Date: Tue Mar 30 00:13:46 2010 +0300 s4/torture: Suppress Valgrind warnings This patch suppresses two Valgrind warnings of type xxx bytes in yy blocks are indirectly lost in loss record --- Summary of changes: source4/torture/smbtorture.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index 2aa340e..d3b1fea 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -641,7 +641,8 @@ int main(int argc,char *argv[]) results = torture_results_init(talloc_autofree_context(), ui_ops); - torture = torture_context_init(s4_event_context_init(NULL), results); + torture = torture_context_init(s4_event_context_init(talloc_autofree_context()), + results); if (basedir != NULL) { if (basedir[0] != '/') { fprintf(stderr, Please specify an absolute path to --basedir\n); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3587815... Fix bug #7339 - MSDFS is non-functional in 3.5.x from 8126c78... s4/torture: Suppress Valgrind warnings http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 358781559526f962c96c1af88cd104946c507d05 Author: Jeremy Allison j...@samba.org Date: Thu Apr 8 20:32:36 2010 -0700 Fix bug #7339 - MSDFS is non-functional in 3.5.x In the refactoring around filename_convert, the split between the functions resolve_dfspath() and resolve_dfspath_wcard() was lost, leaving us only with resolve_dfspath_wcard(). Internally resolve_dfspath_wcard() calls dfs_redirect() only with a allow_wcards flag of true, wheras the old resolve_dfspath() would call with a value of false. The loss of this case causes dfs_redirect to always masquerade DFS links as directories, even when they are being queried directly by a trans2 QPATHINFO call. We should only masquerade DFS links as directories when called from a SMBsearch or trans2 findfirst/findnext - which was the intent of the allow_wcards flag. This patch adds back an allow_wcards bool parameter to resolve_dfspath_wcard(). This bool is set from the state of the ucf_flags when filename_convert() is called. I will follow this up with a new smbclient-based torture test that will prevent us from ever regressing our DFS support again. Jeremy. --- Summary of changes: source3/include/proto.h |1 + source3/smbd/filename.c |2 ++ source3/smbd/msdfs.c|3 ++- source3/smbd/trans2.c |1 + 4 files changed, 6 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/proto.h b/source3/include/proto.h index 7dcdeac..a3435a8 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -6485,6 +6485,7 @@ NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx, connection_struct *conn, bool dfs_pathnames, const char *name_in, + bool allow_wcards, char **pp_name_out, bool *ppath_contains_wcard); NTSTATUS create_conn_struct(TALLOC_CTX *ctx, diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index ab79dfd..154d34a 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -1125,6 +1125,7 @@ NTSTATUS filename_convert(TALLOC_CTX *ctx, struct smb_filename **pp_smb_fname) { NTSTATUS status; + bool allow_wcards = (ucf_flags (UCF_COND_ALLOW_WCARD_LCOMP|UCF_ALWAYS_ALLOW_WCARD_LCOMP)); char *fname = NULL; *pp_smb_fname = NULL; @@ -1132,6 +1133,7 @@ NTSTATUS filename_convert(TALLOC_CTX *ctx, status = resolve_dfspath_wcard(ctx, conn, dfs_path, name_in, + allow_wcards, fname, ppath_contains_wcard); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index dcef75e..6dfa886 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -1738,6 +1738,7 @@ NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx, connection_struct *conn, bool dfs_pathnames, const char *name_in, + bool allow_wcards, char **pp_name_out, bool *ppath_contains_wcard) { @@ -1748,7 +1749,7 @@ NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx, status = dfs_redirect(ctx, conn, name_in, - True, + allow_wcards, pp_name_out, path_contains_wcard); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 0ee9be3..06b454a 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -6038,6 +6038,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn, status = resolve_dfspath_wcard(ctx, conn, req-flags2 FLAGS2_DFS_PATHNAMES, newname, + true, newname, dest_has_wcard); if (!NT_STATUS_IS_OK(status)) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3491f6d... Simplify call_trans2qfilepathinfo() and smbd_do_qfilepathinfo() from 3587815... Fix bug #7339 - MSDFS is non-functional in 3.5.x http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3491f6d119d1f4c7e0a259a9993ce96783b77e23 Author: Jeremy Allison j...@samba.org Date: Thu Apr 8 21:24:23 2010 -0700 Simplify call_trans2qfilepathinfo() and smbd_do_qfilepathinfo() Remove the bool ms_dfs_link parameter from smbd_do_qfilepathinfo. It is not possible for this to be a DFS link. Remove the check_msdfs_link() call from call_trans2qfilepathinfo() - the call to filename_convert() above with a ucf_flags of zero *MUST* catch a DFS link and return NT_STATUS_PATH_NOT_COVERED in this case, so the code below checking for msdfs links is redundent. Don't add this to 3.5.x, as it's an optimization but not needed to fix bug #7339 - MSDFS is non-functional in 3.5.x. Jeremy. --- Summary of changes: source3/smbd/globals.h |1 - source3/smbd/smb2_getinfo.c |2 -- source3/smbd/trans2.c | 21 - 3 files changed, 4 insertions(+), 20 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index f9fd71e..033a777 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -187,7 +187,6 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, struct smb_filename *smb_fname, bool delete_pending, struct timespec write_time_ts, - bool ms_dfs_link, struct ea_list *ea_list, int lock_data_count, char *lock_data, diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c index 3b50ab9..3a8c077 100644 --- a/source3/smbd/smb2_getinfo.c +++ b/source3/smbd/smb2_getinfo.c @@ -246,7 +246,6 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx, struct ea_list *ea_list = NULL; int lock_data_count = 0; char *lock_data = NULL; - bool ms_dfs_link = false; NTSTATUS status; ZERO_STRUCT(write_time_ts); @@ -328,7 +327,6 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx, fsp-fsp_name, delete_pending, write_time_ts, - ms_dfs_link, ea_list, lock_data_count, lock_data, diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 06b454a..991b605 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -4154,7 +4154,6 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, struct smb_filename *smb_fname, bool delete_pending, struct timespec write_time_ts, - bool ms_dfs_link, struct ea_list *ea_list, int lock_data_count, char *lock_data, @@ -4189,12 +4188,7 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, smb_fname_str_dbg(smb_fname), fsp ? fsp-fnum : -1, info_level, max_data_bytes)); - if (ms_dfs_link) { - mode = dos_mode_msdfs(conn, smb_fname); - } else { - mode = dos_mode(conn, smb_fname); - } - + mode = dos_mode(conn, smb_fname); nlink = psbuf-st_ex_nlink; if (nlink (modeaDIR)) { @@ -4976,7 +4970,6 @@ static void call_trans2qfilepathinfo(connection_struct *conn, struct ea_list *ea_list = NULL; int lock_data_count = 0; char *lock_data = NULL; - bool ms_dfs_link = false; NTSTATUS status = NT_STATUS_OK; if (!params) { @@ -5188,14 +5181,8 @@ static void call_trans2qfilepathinfo(connection_struct *conn, return; } - } else if (!VALID_STAT(smb_fname-st) - SMB_VFS_STAT(conn, smb_fname) - (info_level != SMB_INFO_IS_NAME_VALID)) { - ms_dfs_link = check_msdfs_link(conn, - smb_fname-base_name, - smb_fname-st); - - if (!ms_dfs_link) { + } else { +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 08b24e9... Stop smb2 from calling into smb1 blocking lock request code. from 3491f6d... Simplify call_trans2qfilepathinfo() and smbd_do_qfilepathinfo() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 08b24e923dff99d3d3c0618903a7ed2959640470 Author: Jeremy Allison j...@samba.org Date: Thu Apr 8 22:15:55 2010 -0700 Stop smb2 from calling into smb1 blocking lock request code. Allocate a uint16_t internal SMB1 mid for an SMB2 request. Add a back pointer from the faked up smb_request struct to the smb2 request. Getting ready to add restart code for blocking locks, share mode violations and oplocks in SMB2. Jeremy. --- Summary of changes: source3/include/smb.h|6 ++ source3/smbd/blocking.c | 14 ++ source3/smbd/globals.h | 17 + source3/smbd/process.c |1 + source3/smbd/smb2_glue.c | 14 ++ source3/smbd/smb2_lock.c | 20 6 files changed, 72 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/smb.h b/source3/include/smb.h index 751f3a4..48ab2f2 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -623,6 +623,7 @@ struct current_user { NT_USER_TOKEN *nt_user_token; }; +struct smbd_smb2_request; struct smb_request { uint8_t cmd; @@ -670,6 +671,11 @@ struct smb_request { void *async_priv; bool done; + + /* +* Back pointer to smb2 request. +*/ + struct smbd_smb2_request *smb2req; }; /* Defines for the sent_oplock_break field above. */ diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c index cb48cc8..2a0024c 100644 --- a/source3/smbd/blocking.c +++ b/source3/smbd/blocking.c @@ -158,6 +158,20 @@ bool push_blocking_lock_request( struct byte_range_lock *br_lck, struct blocking_lock_record *blr; NTSTATUS status; + if (req-smb2req) { + return smb2_push_blocking_lock_request(br_lck, + req, + fsp, + lock_timeout, + lock_num, + lock_pid, + lock_type, + lock_flav, + offset, + count, + blocking_pid); + } + if(req_is_in_chain(req)) { DEBUG(0,(push_blocking_lock_request: cannot queue a chained request (currently).\n)); return False; diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 033a777..5eea0ce 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -321,6 +321,17 @@ NTSTATUS smbd_smb2_request_process_break(struct smbd_smb2_request *req); void send_smb2_break_message(files_struct *fsp, uint8_t level); void schedule_deferred_open_smb2_message(uint16 mid); +bool smb2_push_blocking_lock_request( struct byte_range_lock *br_lck, + struct smb_request *req, + files_struct *fsp, + int lock_timeout, + int lock_num, + uint32_t lock_pid, + enum brl_type lock_type, + enum brl_flavour lock_flav, + uint64_t offset, + uint64_t count, + uint32_t blocking_pid); struct smbd_smb2_request { struct smbd_smb2_request *prev, *next; @@ -338,6 +349,11 @@ struct smbd_smb2_request { int current_idx; bool do_signing; + /* +* mid used for compatibility with SMB1 code. +* Server allocated, never seen by client. +*/ + uint16_t compat_mid; struct files_struct *compat_chain_fsp; @@ -535,6 +551,7 @@ struct smbd_server_connection { struct smbd_smb2_session *list; } sessions; struct smbd_smb2_request *requests; + uint16_t next_compat_mid; } smb2; }; diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 3e5cee8..ddafdff 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -467,6 +467,7 @@ static bool init_smb_request(struct smb_request *req, const uint8 *inbuf, req-chain_fsp = NULL; req-chain_outbuf = NULL; req-done = false; + req-smb2req = NULL; smb_init_perfcount_data(req-pcd); /* Ensure we have at least wct words and 2 bytes of bcc. */ diff --git a/source3/smbd/smb2_glue.c b/source3/smbd/smb2_glue.c index d5a6217..3ecc790 100644 ---