1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

39099 Commits

Author SHA1 Message Date
Stefan Metzmacher
0c1669ee4b s3:smb2cli: ignore the NBT/Length header in smb2cli_inbuf_parse_compound()
This is not needed and in future we want to support SMBDirect,
which add a different header.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Nov  6 17:17:04 CET 2011 on sn-devel-104
2011-11-06 17:17:04 +01:00
Jeremy Allison
2898485848 Move the SEC_DIR_LIST check into dptr_create for SMB2 and now for SMB1.
The pathname check still needs fixing.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Nov  5 01:38:00 CET 2011 on sn-devel-104
2011-11-05 01:38:00 +01:00
Jeremy Allison
7ff5a5584f can_write_to_file() does now take share permissions into account. Fix comment. 2011-11-04 16:01:16 -07:00
Jeremy Allison
bbcb589ef5 No longer do the pre-check on DELETE_ACCESS - we're correctly checking the ACL every time now. 2011-11-04 15:56:15 -07:00
Jeremy Allison
b988a3233f Remove can_access_file_acl(). We no longer need this duplicate code (hurrah!). 2011-11-04 15:55:11 -07:00
Jeremy Allison
60b741415d Remove can_access_file_data() - make it use the standard smbd_check_access_rights() instead. 2011-11-04 15:45:13 -07:00
Jeremy Allison
4851219333 Add const to the smb_filename argument of smbd_check_access_rights(). 2011-11-04 15:39:55 -07:00
Jeremy Allison
a30f84a21c Expose smbd_check_access_rights() to other modules. 2011-11-04 14:37:26 -07:00
Jeremy Allison
32edc1d047 Rename smbd_check_open_rights() to smbd_check_access_rights() as we're going to remove the static from this. 2011-11-04 14:28:08 -07:00
Jeremy Allison
0c886eeb89 Replace smb1_file_se_access_check() with just se_access_check(). 2011-11-04 14:21:35 -07:00
Jeremy Allison
55b9ba79f8 Move root check out of smb1_file_se_access_check() in preparation for deleting this function. 2011-11-04 14:16:51 -07:00
Jeremy Allison
07edf6c65e smb1_file_se_access_check() is now static to smbd/open.c 2011-11-04 14:16:37 -07:00
Jeremy Allison
1fab17de94 Revert "Change function signature of check_parent_access() to take char * instead of struct smb_filename."
This reverts commit a11c0a41a3.

Not needed.
2011-11-04 14:15:47 -07:00
Jeremy Allison
d433af92b9 Revert "Call check_parent_access() on readdir."
This reverts commit a763edaf9c.

Checking the wrong thing..
2011-11-04 14:15:43 -07:00
Henry Wong
51c86c8e67 Properly fix bug #8384 - Windows XP clients seem to crash smbd process every once in a while.
Ensure we correctly null out the referenced pointer when we decrease the ref. count.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Nov  4 21:12:13 CET 2011 on sn-devel-104
2011-11-04 21:12:13 +01:00
Christian Ambach
b99becd4fa s3:smbd increase a debug level
logging disconnected clients with level 1 swamps the logs
2011-11-04 17:39:43 +01:00
Stefan Metzmacher
9b4c300922 s3:smbd: also send the server name in the negprot response
This matches W2K (at least sp4) and higher.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Nov  4 15:50:06 CET 2011 on sn-devel-104
2011-11-04 15:50:06 +01:00
Stefan Metzmacher
e99017af72 s3:libsmb: also remember the optional server name from the negprot response
W2K (at least sp4) and higher also send the server name.

metze
2011-11-04 14:16:29 +01:00
Stefan Metzmacher
aea76a3aaa s3:libsmb: the workgroup in the non-extended-security negprot is not aligned (#8573)
I've tested the fix against NT4 sp6a, W2K sp4, W2K8R2 and Win8pre0.

metze
2011-11-04 14:16:28 +01:00
Michael Adam
e30892764e s3:selftest: improve logging in the registry upgrade test
Don't only log to the log file. Give "make test" a cance to grab
some output. And add some more messages.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Nov  4 01:58:20 CET 2011 on sn-devel-104
2011-11-04 01:58:20 +01:00
Björn Baumbach
2e1f7e137d s3-selftest: add new registry upgrade test to test list
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-04 00:28:08 +01:00
Björn Baumbach
2f9b453635 s3-selftest: introduce registry upgrade test
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-04 00:28:08 +01:00
Jeremy Allison
767c54d8dd Fix bug #8562 - talloc: double free error.
Ensure we don't access an undefined pointer.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Nov  4 00:09:46 CET 2011 on sn-devel-104
2011-11-04 00:09:45 +01:00
Günther Deschner
6e67073900 waf: convert NDR_NBT into shared library.
Guenther
2011-11-03 18:35:09 +01:00
Günther Deschner
185b94eefa nbt: trim down header dependencies of nbt.idl.
Guenther
2011-11-03 18:35:08 +01:00
Günther Deschner
72879f491f nbt: merge in LIBCLI_NDR_NETLOGON helper into NDR_NBT.
Guenther
2011-11-03 18:35:08 +01:00
Günther Deschner
2ecd50116c librpc: remove nbt dependency to samr.
Guenther
2011-11-03 18:35:08 +01:00
Günther Deschner
e426f37b64 librpc: only let NDR_NBT depend on NDR_NBT_BUF.
Guenther
2011-11-03 18:35:08 +01:00
Stefan Metzmacher
05d3a6f219 s3:param: change default of "* signing" to "default"
This should not change the bahavior.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Nov  3 18:33:34 CET 2011 on sn-devel-104
2011-11-03 18:33:34 +01:00
Stefan Metzmacher
caa134672c s3:smbd: make use of SMB_SIGNING_* constants
metze
2011-11-03 16:55:13 +01:00
Stefan Metzmacher
7de694974e s3:libsmb: make use of SMB_SIGNING_* constants
metze
2011-11-03 16:55:13 +01:00
Stefan Metzmacher
b3f126b44c s3:lib: make use of SMB_SIGNING_* constants
metze
2011-11-03 16:55:13 +01:00
Stefan Metzmacher
a7051dfcff s3:libsmb: make use of SMB_SIGNING_* constants
metze
2011-11-03 16:55:13 +01:00
Stefan Metzmacher
1b04e54b57 s3:libsmb: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:13 +01:00
Stefan Metzmacher
59dcdfd175 s3:torture: s/Undefined/SMB_SIGNING_DEFAULT/ s/Required/SMB_SIGNING_REQUIRED/
metze
2011-11-03 16:55:13 +01:00
Stefan Metzmacher
784cf12fb1 s3:lib: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:13 +01:00
Stefan Metzmacher
19eaaa8030 s3:lib/netapi: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
07cd85fd8b s3:libnet: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
6db670386b s3:winbindd: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
c4fecca261 s3:web: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
92a6f577ce s3:utils: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
f61fb18e0a s3:nmbd: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
2202c3ce02 s3:auth: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
ff66e521e0 s3:client: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
4d8998302c s3:param: make use of SMB_SIGNING_* constants
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
44d7774a18 s3:param: the behavior of "client/server signing = auto" is the same as "true"
So remove the special case for 'Auto'.

metze
2011-11-03 16:55:11 +01:00
Stefan Metzmacher
09fe037b64 s3:libsmb: restore the 3.6.x behavior signing config parameters
metze
2011-11-03 16:55:11 +01:00
Björn Baumbach
bdf755ce08 s3-build: add bin/dbwrap_tool to the BIN_PROGS2 dependencies
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Nov  3 11:52:53 CET 2011 on sn-devel-104
2011-11-03 11:52:53 +01:00
Björn Baumbach
66eefde53b s3-registry: fix upgrade code
Assume REGDB_VERSION_V1 if no version key found in registry.tdb

Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-03 10:13:41 +01:00
Björn Baumbach
bdc973b5db s3-utils: net - Fix one error/usage message
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-03 10:13:40 +01:00
Björn Baumbach
955775023b s3-printing: fix typo
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-03 10:13:40 +01:00
Stefan Metzmacher
881feda353 s3:torture: let SMB2-BASICS work against w2k8r2 and win8pre0
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Nov  3 09:44:59 CET 2011 on sn-devel-104
2011-11-03 09:44:59 +01:00
Günther Deschner
1c72d3b513 s3-waf: convert libcli_netlogon3 into a private library.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Nov  2 18:34:55 CET 2011 on sn-devel-104
2011-11-02 18:34:54 +01:00
Sumit Bose
f143c24fd0 s3-lsa: Let passdb backend handle the DOMAIN$ user
Signed-off-by: Günther Deschner <gd@samba.org>
2011-11-02 16:59:33 +01:00
Günther Deschner
54f7667f49 s3-waf: move trusts_util.c code into a private library.
Guenther
2011-11-02 16:59:32 +01:00
Günther Deschner
16627ca313 s3-trustdomcache: make enumerate_domain_trusts() static.
Guenther
2011-11-02 16:59:32 +01:00
Günther Deschner
973e047a94 s3-waf: convert libnet_keytab into a private library.
Guenther
2011-11-02 16:59:32 +01:00
Günther Deschner
13ff228b7b s3-libnet: add ads forward declaration in libnet keytab code.
Guenther
2011-11-02 16:59:32 +01:00
Günther Deschner
1926114358 s3-waf: fix libgpo.so library name.
Guenther
2011-11-02 16:59:32 +01:00
David Disseldorp
8fb9e087e3 s3:smb2_server: remove unused outhdr variables 2011-11-02 15:15:28 +01:00
Jeremy Allison
cde73e2ece Remove opendir() VFS code from ACL modules.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Nov  2 02:13:51 CET 2011 on sn-devel-104
2011-11-02 02:13:51 +01:00
Jeremy Allison
a763edaf9c Call check_parent_access() on readdir. 2011-11-01 16:38:14 -07:00
Jeremy Allison
a11c0a41a3 Change function signature of check_parent_access() to take char * instead of struct smb_filename.
Expose it so it can be called from directory code.
2011-11-01 16:38:14 -07:00
Stefan Metzmacher
91648aeb64 s3:smb2_server: FLAG_CHAINED means we always use the last session_id and tid
metze
2011-10-31 19:39:02 +01:00
Stefan Metzmacher
8d07d7148b s3:smb2_server: don't reset the tid and session id in the out hdr of compound requests
Windows also leaves tid (0xFFFFFFFF) and session id (0xFFFFFFFFFFFFFFFF)
as the client requested them.

metze
2011-10-31 19:39:02 +01:00
Stefan Metzmacher
c7d3b6b2c3 s3:smb2_server: echo the SMB2_HDR_CREDIT_CHARGE and SMB2_HDR_SIGNATURE fields
Windows just echos back the given values by default.

metze
2011-10-31 19:39:02 +01:00
Stefan Metzmacher
63c7107c4a s3:smbd: also the parent smbd needs FLAG_MSG_PRINT_GENERAL (bug #8553)
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 31 17:37:34 CET 2011 on sn-devel-104
2011-10-31 17:37:33 +01:00
David Disseldorp
8b375eef24 s3: fix typo in net ads join output
Space missing from "DNS update in aclustered setup".

Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Mon Oct 31 16:01:35 CET 2011 on sn-devel-104
2011-10-31 16:01:35 +01:00
Volker Lendecke
d5fe21c003 s3: Fix some nonempty blank lines
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Oct 31 14:25:14 CET 2011 on sn-devel-104
2011-10-31 14:25:14 +01:00
Volker Lendecke
625ad07f4f s3: Fix a comment 2011-10-31 12:48:06 +01:00
Volker Lendecke
a86c536227 s3: Remove some leftovers of old ctdb tdb2 code 2011-10-31 12:48:06 +01:00
Jeremy Allison
f30f71c14a Fix bug #8548 - winbind_samlogon_retry_loop ignores logon_parameters flags.
Fix confirmed by reporter.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 28 23:04:47 CEST 2011 on sn-devel-104
2011-10-28 23:04:47 +02:00
Jeremy Allison
3bd6513884 Remove the order dependency in parent_override_delete(), just check for & not ==. 2011-10-28 12:16:42 -07:00
Jeremy Allison
30a599684a Remove the mkdir and open functions from the ACL modules - main code paths now handle this. 2011-10-28 12:16:42 -07:00
Jeremy Allison
8a65e2c747 Remove unused "struct security_descriptor" parameter from check_parent_access() 2011-10-28 12:16:42 -07:00
Jeremy Allison
ea195b6cd2 Finally do all the open checks inside open_file(). Checks inside
vfs_acl_common can now be removed.
2011-10-28 12:16:42 -07:00
Jeremy Allison
8a3070a7c9 Simplify smbd_check_open_rights() and move all the special casing inside it. 2011-10-28 12:16:42 -07:00
Jeremy Allison
18df3aedb9 Move parent_override_delete() to before I need to use it. 2011-10-28 12:16:42 -07:00
Jeremy Allison
1619de3080 Make smbd_check_open_rights() static. 2011-10-28 12:16:42 -07:00
Günther Deschner
151bb290d1 s3-net: Make sure to always re-use the "good" dc for the DNS updates as well.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct 28 19:13:49 CEST 2011 on sn-devel-104
2011-10-28 19:13:49 +02:00
Andrew Bartlett
b256799eaf lib/util Rename samba_init_module -> samba_module_init
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
87354c9a6d lib/util Split samba-modules library into public and private parts
This will allow OpenChange to get at the symbols it needs, without
exposing any more of this as a public API than we must.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
1bc787d271 s3-selftest Add all the LOCAL-* smbtorture tests to make test
The extra knownfail and skip entries are for tests the currently do
not pass or hang.  We need to work out why this happens, and fix the
test or the test invocation.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
289b03de5d s3-build: Remove libbigballofmud.so
We no longer need this, as all the small test binaries have either
been converted rolled into python bindings and python-subunit tests, or have
been moved into smbtorture.

                       --------------
                      /              \
                     /      REST      \
                    /        IN        \
                   /       PEACE        \
                  /                      \
                  |  libbigballofmud.so  |
                  |                      |
                  |                      |
                  |      26 October      |
                  |                      |
                  |         2011         |
                 *|     *  *  *          | *
        _________)/\\_//(\/(/\)/\//\/\///|_)_______

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
f28fda7638 s3-torture Remove t_stringoverflow as fstrcpy now uses strlcpy
Because we no longer use safe_strcpy() internally, we no longer have a
mode where we write to the end of the buffer in developer mode, and so
there isn't anything for this test to test.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
9fe8c3db91 s3-selftest: Add LOCAL-sprintf_append 2011-10-28 13:10:28 +02:00
Andrew Bartlett
f31fd31b71 s3-torture run t_strappend tests as LOCAL-sprintf_append 2011-10-28 13:10:28 +02:00
Andrew Bartlett
4cc0552f6e s3-torture Run t_strappend test for less time 2011-10-28 13:10:28 +02:00
Andrew Bartlett
de148f748a s3-torture Fix t_strappend test 2011-10-28 13:10:27 +02:00
Andrew Bartlett
659ec79245 selftest: Have only one set of selftest knownfail and skip files
Listing tests that are not ever proposed (eg samba4.* in the samba3 selftest)
is not an error, so just combine the lists.

This is being done because some folks trying to learn how our 'make
test' works are having trouble following the distributed nature of the
selftest system.

Andrew Bartlett
2011-10-28 13:10:27 +02:00
Andrew Bartlett
f54dcc86b8 s3-torture remove unused t_push_ucs2.c t_strcmp.c t_strstr.c
These tests were incorportated into
source4/scripting/python/samba/tests/strings.py with
fa3e2fc8bb.

Andrew Bartlett
2011-10-28 13:10:27 +02:00
Andrew Bartlett
961952ee64 s3-torture remove unused t_asn1.c
This test was incorportated into lib/util/test/asn1_test.c with
ede98c0e51

Andrew Bartlett
2011-10-28 13:10:27 +02:00
Günther Deschner
2330e52cac s3-passdb: use tevent_context in passdb.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct 28 13:09:47 CEST 2011 on sn-devel-104
2011-10-28 13:09:47 +02:00
Günther Deschner
0b6ced6209 s3-smbldap: use tevent_context in smbldap.
Guenther
2011-10-28 11:35:28 +02:00
Volker Lendecke
a29f7e632f s3-ctdb: Fix ctdb_read_req
If a complete request has come in already before we consumed it, the
ctdb_packet_fd_read_sync will block indefinitely. So always try packet_handler
first and only if that fails due to insufficient data, read from the socket.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Oct 27 22:12:05 CEST 2011 on sn-devel-104
2011-10-27 22:12:05 +02:00
Volker Lendecke
195ae03950 s3-ctdb: Add debug to ctdb_processes_exist 2011-10-27 20:28:31 +02:00
Volker Lendecke
4a96b629a6 s3: Use serverids_exist in parse_share_modes
This is the main reason for the preceding commits. We need to reduce the number
of round-trips to ctdb when checking the locking record entries for existence.
Using the plural version of process_exists gets the number of round-trips to
ctdb for process_exists down to 1.
2011-10-27 20:28:31 +02:00
Volker Lendecke
37d7d52358 s3: Add serverids_exist 2011-10-27 20:28:31 +02:00
Volker Lendecke
ba0171f724 s3: Add processes_exist 2011-10-27 20:28:31 +02:00
Volker Lendecke
c5cfc83a3e s3-ctdb: Make ctdbd_process_exists use ctdbd_processes_exist
Not strictly necessary, but more code exercise is good
2011-10-27 20:28:31 +02:00
Volker Lendecke
1c4fe39033 s3-ctdb: Add ctdb_processes_exist
This sends out a number of process_exists controls in parallel and collects the
replies as they come in.
2011-10-27 20:28:31 +02:00
Volker Lendecke
c2edecf6bd s3-ctdb: Allow ctdb_read_req to read any reqid 2011-10-27 20:28:31 +02:00
Volker Lendecke
2cf1347211 s3-ctdb: Don't hand out 0 as reqid
0 will be used as a wildcard reqid in ctdb_read_req
2011-10-27 20:28:31 +02:00
Volker Lendecke
e5231a5976 s3: Use talloc_tos() in parse_share_modes() 2011-10-27 20:28:31 +02:00
Volker Lendecke
22ccbf2bd4 s3: Fix some nonempty blank lines 2011-10-27 20:28:31 +02:00
Volker Lendecke
4b9cc8f8f9 s3: Fix some type-punned warnings 2011-10-27 20:28:31 +02:00
Andreas Schneider
4186ef9560 s4-torture: Add a samr privilege check.
This is the first part which checks if a deleted user is propagated
correctly to all daemons and caches with user information are emtpy.
2011-10-27 17:09:50 +02:00
Stefan Metzmacher
790c6b4027 s3:rpc_client: remove references to auth_ntlmssp_state
metze

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct 27 16:40:15 CEST 2011 on sn-devel-104
2011-10-27 16:40:15 +02:00
Andreas Schneider
cdb7ef9118 s3: Enable uid wrapper.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Oct 27 15:06:58 CEST 2011 on sn-devel-104
2011-10-27 15:06:58 +02:00
Andreas Schneider
7b5fb7d9e8 replace: Add don't include unistd.h directly and add uid_wrapper. 2011-10-27 13:32:02 +02:00
Andreas Schneider
2f65ae25df s3: Include uid_wrapper where it is missing. 2011-10-27 13:32:02 +02:00
Andreas Schneider
7cb08171ce Include uid_wrapper correctly. 2011-10-27 13:32:02 +02:00
Andreas Schneider
32fb9017ea s3-waf: Don't link uid_wrapper more than once.
The uid_wrapper is linked in globally by default if enabled.
2011-10-27 13:32:02 +02:00
Andreas Schneider
bda9752b10 s3-netlogon: Fix setting the machinge account password.
This bug has been found with uid wrapper.
2011-10-27 13:32:00 +02:00
Jeremy Allison
62ccae3229 Factor out the code checking if a parent should override DELETE_ACCESS into a function.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 26 23:15:05 CEST 2011 on sn-devel-104
2011-10-26 23:15:05 +02:00
Jeremy Allison
4ec2c2a5e8 Remove another level of indentation - deal with !NT_STATUS_OK individually. 2011-10-26 12:29:19 -07:00
Jeremy Allison
4b9bdee167 Add early return on stat open without O_CREAT if file doesn't exist.
Reduces one level of indentation.
2011-10-26 12:08:51 -07:00
Stefan Metzmacher
1d531090bc s3:libsmb: make use of map_nt_error_from_unix_common() in clitrans.c
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Oct 26 17:53:15 CEST 2011 on sn-devel-104
2011-10-26 17:53:15 +02:00
Stefan Metzmacher
9a3e5965b4 s3:libsmb: avoid using smb_flg2 in cli_trans.c
metze
2011-10-26 16:18:28 +02:00
Stefan Metzmacher
f3166e75ef s3:libsmb: replace smb_size - 4 with MIN_SMB_SIZE in clitrans.c
metze
2011-10-26 15:44:52 +02:00
Stefan Metzmacher
7221ce9bd5 s3:libsmb: use 'tevent_' instead of 'event_' in clitrans.c
metze
2011-10-26 15:43:08 +02:00
Stefan Metzmacher
f8f7f4e3ab s3:libsmb: make use of smb_buffer_oob() in clitrans.c
metze
2011-10-26 15:41:34 +02:00
Stefan Metzmacher
431b476868 s3:libsmb: use smb_len_nbt() in clitrans.c
metze
2011-10-26 15:41:02 +02:00
Stefan Metzmacher
7682f61e10 s3:include: implement trans_oob() as wrapper to smb_buffer_oob()
metze
2011-10-26 15:33:30 +02:00
Günther Deschner
d66d7c2b00 s3-netapi: remove pointless use_memory_krb5_ccache.
This breaks the ABI.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 26 13:23:58 CEST 2011 on sn-devel-104
2011-10-26 13:23:58 +02:00
Stefan Metzmacher
0d9bd56afb libcli/smb: merge NEGOTIATE_SECURITY_* flags to smb_constants.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Oct 26 11:27:12 CEST 2011 on sn-devel-104
2011-10-26 11:27:12 +02:00
Stefan Metzmacher
44689b1ee7 s3:lib: make_unix_date3() is the same as pull_dos_date3()
Except for a 'void *' vs. 'uint8_t *'.

As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.

metze
2011-10-26 09:42:04 +02:00
Stefan Metzmacher
0e95c8aa5c s3:lib: make_unix_date2() is the same as pull_dos_date2()
Except for a 'void *' vs. 'uint8_t *'.

As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.

metze
2011-10-26 09:42:04 +02:00
Stefan Metzmacher
a1796465e8 s3:lib: make_unix_date() is the same as pull_dos_date()
Except for a 'void *' vs. 'uint8_t *'.

As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.

metze
2011-10-26 09:42:03 +02:00
Björn Baumbach
2fac12b276 s3-util: dbwrap_tool: fix fetch_string function
We do not want truncated strings.

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Oct 26 04:17:05 CEST 2011 on sn-devel-104
2011-10-26 04:17:05 +02:00
Gregor Beck
f881d43837 s3:net registry check: fix a case where automatic and read only mode take the wrong action
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-26 02:44:03 +02:00
Gregor Beck
4fe5e091e1 s3:net registry check: do not silently replace separators
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-26 02:44:03 +02:00
Jeremy Allison
0f746fcad8 Second attempt to fix bug #8384 - Windows XP clients seem to crash smbd process every once in a while.
Don't just use the first entry in back_channels as a talloc context
to allocate a long-lived chan entry on - must be NULL. It's already
correctly deleted when the last reference goes away.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 26 02:42:35 CEST 2011 on sn-devel-104
2011-10-26 02:42:35 +02:00
Stefan Metzmacher
414df4b9c4 s3:smb2cli_base: make use of [_]smb_[set]len_tcp()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Oct 25 19:30:43 CEST 2011 on sn-devel-104
2011-10-25 19:30:43 +02:00
Stefan Metzmacher
fc69057b8b s3:smb2cli_base: make use of map_nt_error_from_unix_common()
metze
2011-10-25 17:58:33 +02:00
Stefan Metzmacher
fd261fea74 s3:lib/errmap_unix: map EPIPE to NT_STATUS_CONNECTION_DISCONNECTED
This lets map_nt_error_from_unix() return the same value as
map_nt_error_from_unix_common().

There are no callers relying on NT_STATUS_PIPE_BROKEN.

metze
2011-10-25 17:58:33 +02:00
Stefan Metzmacher
e947acaa8a s3:libsmb: s/event_context/tevent_context/ in async_smb.[ch]
metze
2011-10-25 17:58:33 +02:00
Stefan Metzmacher
dd9d40a0e6 s3:lib/addrchange.h: include libreplace headers before others
Also we typically don't use an explicit "lib/replace/" prefix.

metze
2011-10-25 17:58:33 +02:00
Andrew Bartlett
254601df4d build: always include tevent with <tevent.h>
This ensures we do the right thing if we are built against the system
tevent.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-25 17:58:33 +02:00
Andrew Bartlett
2d05cb9096 build: always include talloc with <talloc.h>
This ensures we do the right thing if we are built against the system
talloc.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-25 17:58:33 +02:00
Andrew Bartlett
50e7a8767f torture: Remove unused smbiconv
smbiconv is not used in any test script, and has only had changes
since being introduced by Jelmer to keep it building.

It is also not installed on the system. I have also checked with
Jelmer, who approved the removal.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-25 17:58:33 +02:00
Stefan Metzmacher
242292d4de s3:libsmb: make use of map_nt_error_from_unix_common() in async_smb.c
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Oct 25 03:21:06 CEST 2011 on sn-devel-104
2011-10-25 03:21:06 +02:00
Stefan Metzmacher
6fb13f4c19 s3:libsmb: use HDR_* defines in cli_state_dispatch_smb1()
metze
2011-10-25 01:47:22 +02:00
Stefan Metzmacher
648665a008 s3:libsmb: make use of smb_[set]len_nbt() in async_smb.c
metze
2011-10-25 01:47:21 +02:00
Stefan Metzmacher
d670d060fc s3:libsmb: use HDR_* defines in cli_pull_raw_error()
metze
2011-10-25 01:47:21 +02:00
Stefan Metzmacher
1fa7300037 libcli/smb: move smb_signing.[ch] to the toplevel
metze
2011-10-25 01:47:21 +02:00
Stefan Metzmacher
aa2e5cea1c s3:libsmb/smb_signing: make use of HDR_* defines
metze
2011-10-25 00:24:08 +02:00
Stefan Metzmacher
13a5f27db2 s3:libsmb/smb_signing: make use of smb_len_nbt()
metze
2011-10-25 00:24:08 +02:00
Stefan Metzmacher
4db071cca4 s3:libsmb/smb_signing: avoid usage of smb_ss_field
metze
2011-10-25 00:24:07 +02:00
Jeremy Allison
4ba00ab57b Try and fix bug #8384 - Windows XP clients seem to crash smbd process every once in a while.
Remove the copy of the binding handle from struct notify_back_channel, use
the direct pointer in struct rpc_pipe_client instead. Ensure we can't call
the functions with a NULL binding handle.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Oct 24 22:56:40 CEST 2011 on sn-devel-104
2011-10-24 22:56:40 +02:00
Simo Sorce
8870daeb8d idl: Improve MS-PAC IDL
Change some misleading variable names to reflect the actual function.
Add missing field name/types previously marked as unkown.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 24 19:19:28 CEST 2011 on sn-devel-104
2011-10-24 19:19:28 +02:00
Stefan Metzmacher
f3c25bc6a5 libcli/smb: merge LOCKING_ANDX_* and OPLOCK_* defines to smb_constants.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 24 17:46:47 CEST 2011 on sn-devel-104
2011-10-24 17:46:47 +02:00
Stefan Metzmacher
ec7cc700b2 libcli/smb: move more defines to smb_constants.h
metze
2011-10-24 16:10:36 +02:00
Stefan Metzmacher
6fef69562b libcli/smb: move CAP_* defines to smb_constants.h
metze
2011-10-24 16:10:36 +02:00
Stefan Metzmacher
7ebd4337ac libcli/smb: move source3/libsmb/read_smb.* to the toplevel
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 24 10:18:06 CEST 2011 on sn-devel-104
2011-10-24 10:18:06 +02:00
Stefan Metzmacher
6e2ecaf77d s3:libsmb/read_smb: make use of smb_len_tcp()
metze
2011-10-24 08:41:15 +02:00
Stefan Metzmacher
8f356baab6 s3:libsmb: remove unused sync read_smb()
metze
2011-10-24 08:25:31 +02:00
Stefan Metzmacher
99666e4a8d s3:torture: avoid using read_smb()
metze
2011-10-24 08:25:31 +02:00
Jeremy Allison
f459318187 Third part of fix for bug #8541 - readlink() on Linux clients fails if the symlink target is outside of the share.
Missed passing ucf_flags instead of hard coded flags in findfirst call.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Oct 22 06:30:16 CEST 2011 on sn-devel-104
2011-10-22 06:30:16 +02:00
Jeremy Allison
d1a4ee604f Second part of fix for bug #8541 - readlink() on Linux clients fails if the symlink target is outside of the share.
The statcache has to do lstat instead of stat when returning cached
posix pathnames.
2011-10-22 04:57:10 +02:00
Jeremy Allison
662e9c04fb Fix bug #8541 - readlink() on Linux clients fails if the symlink target is outside of the share.
The key is to only allow the lookup to succeed if it's a UNIX level lookup or readlink,
but disallow all other operations.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Oct 22 01:37:41 CEST 2011 on sn-devel-104
2011-10-22 01:37:41 +02:00
Jeremy Allison
6bd49ea4ae Deprecate "acl check permissions".
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 21 21:51:18 CEST 2011 on sn-devel-104
2011-10-21 21:51:18 +02:00
Christian Ambach
ed45a558ae s3:idmap_autorid: add an allocation range to autorid
this is needed to allocate gids for BUILTIN\Users and
BUILTIN\Administrators and for local users/group that
admins might want to create

autorid will now allocate one range for this purpose
and can so give out as many uids and gids as the
configured rangesize allows
2011-10-21 16:30:56 +02:00
Christian Ambach
0a85d1c891 s3:idmap_autorid: move HWM initialization into a function
we will need some more HWM soon, so move out initialization and
optimize the logic using the new interface of dbwrap_fetch_uint32
2011-10-21 16:30:56 +02:00
Christian Ambach
8d9aea2a66 s3:idmap_autorid: use strings as parameter for range allocator
this prepares for allocation of non-domain ranges that cannot be
expressed by a SID (e.g. an allocation pool)
2011-10-21 16:30:56 +02:00
Christian Ambach
a4d245b3e8 s3:winbindd/idmap make idmap modules loadable again
commit 355b5e3a83 changed the module system to
expect 'samba_init_module' as fixed initializer function
2011-10-21 16:30:56 +02:00
Christian Ambach
bfe1385e31 Revert "s3:idmap/autorid add a small alloc pool to autorid"
This reverts commit 0aa558718a.

just having 500 uid/gids values is not good enough for
users using local users and groups in the order of thousands

better solution which will use a complete range for allocated
uids/gids will come next.
2011-10-21 16:30:56 +02:00
Günther Deschner
bba114af6e s3-waf: only compile common.c in netapi examples code once.
Guenther
2011-10-21 11:31:57 +02:00
Günther Deschner
81435bf26b s3-netapi: use NetApiBufferAllocate() for returned buffer in getdc calls.
Guenther
2011-10-21 11:07:25 +02:00
Günther Deschner
23fea38deb s3-netapi: fix missing include in examples code.
Guenther
2011-10-21 11:07:24 +02:00
Stefan Metzmacher
75d146d3ed libcli/smb: move smb_seal.c to the toplevel
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Oct 21 10:22:39 CEST 2011 on sn-devel-104
2011-10-21 10:22:39 +02:00
Andrew Bartlett
321204eaeb s3-ntlmssp Remove references to auth_ntlmssp_context from the rpc code
We always dereferenced auth_ntlmssp_state->gensec_security, so now we
do not bother passing around the whole auth_ntlmssp_state.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:50:55 +02:00
Andrew Bartlett
38de149e9b s3-seal Remove struct smb_srv_trans_enc_ctx
This structure added no value, particularly after the move to gensec.

It was added at a time when auth_ntlmssp_state was not available in
the client.  This changed a while back (the wrapper was extended with
client calls), and the move to gensec again reinforced that we do not
need the extra complexity.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:50:02 +02:00
Andrew Bartlett
0fe4192054 s3-ntlmssp Remove references to auth_ntlmssp_context from the smb sealing code
Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:44:48 +02:00
Andrew Bartlett
0a0839821a s3-ntlmssp Remove auth_ntlmssp_session_key()
We now just call the gensec_session_key() directly.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:43:38 +02:00
Andrew Bartlett
3f079885b2 s3-ntlmssp Remove auth_ntlmssp_want_feature()
We now just call the gensec_want_feature() directly.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:43:33 +02:00
Andrew Bartlett
b9b170a9dd s3-seal use gensec_[un]wrap() instead of gensec_[un]seal_packet()
This should not make a difference for NTLMSSP as it still calls the
low level ntlmssp_[un]seal_packet() functions with the same input parameters.

If we convert the gss-api/krb5 based code to gensec we have to use
gensec_[un]wrap() as the wire format is different compared to
gensec_[un]seal_packet() there.

Andrew Bartlett

Split from another commit by Stefan Metzmacher <metze@samba.org>
2011-10-21 08:43:28 +02:00
Andrew Bartlett
bd29f79463 s3-ntlmssp use gensec_{seal,unseal,sign,check}_packet
This avoids the indirection via the auth_ntlmsssp wrapper functions.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:43:23 +02:00
Andrew Bartlett
487545d48f s3-ntlmssp Remove auth_ntlmssp_negotiated_sign() and auth_ntlmssp_negotiated_seal()
We now just call the gensec_have_feature() directly.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:43:18 +02:00
Andrew Bartlett
083025ccd5 s3-ntlmssp Remove auth_ntlmssp_update wrapper
We now just call gensec_update directly.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:43:10 +02:00
Andrew Bartlett
915fe7981b s3-auth remove auth_ntlmssp_session_info()
Instead, call gensec_session_info() directly.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:43:02 +02:00
Stefan Metzmacher
21a434d817 s3:smbd/seal: pass talloc_tos() auth_ntlmssp_update(), because we free a few lines later
metze
2011-10-21 08:43:01 +02:00
Stefan Metzmacher
07f67d8612 s3:libsmb/smb_seal: always use SAFE_FREE(buf) in common_free_enc_buffer()
There's no need to do gss-api specific stuff, the buffer is always
malloc'ed.

metze
2011-10-21 08:43:01 +02:00
Stefan Metzmacher
12e257999b s3:libsmb/smb_seal: use plain malloc() in common_ntlm_encrypt_buffer()
metze
2011-10-21 08:43:01 +02:00
Stefan Metzmacher
2a3bf9eb2f s3:libsmb/smb_seal: avoid ads_errstr() dependency and use gssapi_error_string()
metze
2011-10-21 08:43:00 +02:00
Stefan Metzmacher
8df8277b0a s3:libsmb/smb_seal: make use of common [_]smb_[set]len_nbt() macros
metze
2011-10-21 08:43:00 +02:00
Stefan Metzmacher
6d2aaef787 s3:include: make smb_setlen() a macro
metze
2011-10-21 08:43:00 +02:00
Stefan Metzmacher
32938ce60d libcli/smb: move some common defines to smb_constants.h
metze
2011-10-21 08:42:59 +02:00
Andrew Bartlett
1af128bd2b build: compile (but do not install) netapi examples
The only example not yet built is the GTK domain join gui.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Oct 21 01:31:55 CEST 2011 on sn-devel-104
2011-10-21 01:31:55 +02:00
Björn Jacke
37be1df3d7 s3:Makefile: make DSO_EXPORTS_CMD more portable (#8531)
It sems like every not completely trivial sed expression should be tested with
Solaris' sed.  Its regexp engine is way more limited than the one of GNU
sed. Thanks to Michael Pelletier for finding this! This fixes bug #8531

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Thu Oct 20 23:15:05 CEST 2011 on sn-devel-104
2011-10-20 23:15:05 +02:00
Jeremy Allison
30fb5e9969 Refactor to create check_parent_access() which can be called for file creation too.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Oct 20 20:29:22 CEST 2011 on sn-devel-104
2011-10-20 20:29:22 +02:00
Jeremy Allison
ff8fa5aa2b Make mkdir_internal() check the parent ACL for SEC_DIR_ADD_SUBDIR rights. 2011-10-20 09:07:46 -07:00
Andrew Bartlett
06d138a7d9 s3-netapi Compile (but do not install) netapi tests 2011-10-20 12:17:07 +02:00
Stefan Metzmacher
81f71e76fd s3:libsmb/async_smb: in cli_state_notify_pending() we always disconnect
So we should always set state->mid = 0.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Oct 20 11:34:23 CEST 2011 on sn-devel-104
2011-10-20 11:34:23 +02:00
Jeremy Allison
f64f91f96f Fix error return to be NT_STATUS_NOT_A_DIRECTORY. 2011-10-20 00:58:29 +02:00
Jeremy Allison
7b4edc11e3 Make use of the "dir_exists" we already have on directory open. 2011-10-20 00:58:29 +02:00
Günther Deschner
ce45ae122e s3-waf: make sure we always compile (not install) our libsmbclient testcode.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 19 20:42:52 CEST 2011 on sn-devel-104
2011-10-19 20:42:51 +02:00
Stefan Metzmacher
d825a2add6 s3:libsmb/smb_seal: move smb_set_enclen() to smb_seal.c and make it static there
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Oct 19 19:06:35 CEST 2011 on sn-devel-104
2011-10-19 19:06:35 +02:00
Stefan Metzmacher
0e0e44a626 s3:libsmb/smb_seal: s/uint16/uint16_t
metze
2011-10-19 17:32:23 +02:00
Stefan Metzmacher
1b9c8d4867 s3:include: move smb_seal.c prototypes to smb_crypt.h
metze
2011-10-19 17:32:23 +02:00