summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-03-25selftest: Add tests for samba-tool dbcheck --reset-well-known-aclsAndrew Bartlett4-3/+78
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25scripting: Modify samba.descriptor.get_diff_sds() to cope with a missing ↵Andrew Bartlett1-2/+2
reference owner This allows the reference SD not to have an owner specified, and still have the comparison with a database SD that does have an owner pass. (And the same for owning group). Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25samba-tool dbcheck: Allow dbcheck to correct an nTSecurityDescriptor without ↵Andrew Bartlett1-0/+41
an owner or group This is done by making a modification to the SD, which triggers it to be filled in if we have the correct session_info established on the DB. However, we normally want dbcheck running as system, so we wrap the session_info set around this operation only. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25samba-tool dbcheck: Add --reset-well-known-aclsAndrew Bartlett2-4/+71
This will allow an upgrade from Samba 4.0.0 without needing to run samba_upgradeprovision, which for now is not the preferred upgrade tool. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25scripting: Move get_diff_sds from samba.upgradehelpers to samba.descriptorAndrew Bartlett4-157/+158
This helps avoid a dependency loop when we use get_diff_sds in dbcheck. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25scripting: Modify samba.descriptor.get_wellknown_sds() use samdb calls onlyAndrew Bartlett2-50/+59
We need this routine not to use the names context as this is tied to provision, and we end up in a circular dependency if we use that in dbcheck. Andrew Bartlett
2013-03-25scripting: Move samba.provision.descriptor to samba.descriptorAndrew Bartlett4-3/+3
This will allow dbcheck to import it, without a cirucular dependency via samba.provision importing dbcheck. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25scripting: Make samba.provision.descriptor.get_wellknown_sds() return ldb.Dn ↵Andrew Bartlett2-35/+35
objects As we look to use this function in more places, it does not make sense to constantly create Dn objects from the strings. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25scripting: Fix documentation comment on upgradehelpers.py:get_clean_sdAndrew Bartlett1-8/+3
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25scripting: Move the list of well known SDs to samba.provision.descriptorAndrew Bartlett2-71/+60
This will allow us to call this from dbcheck. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25build: Do not pass CPP="" to pidl, skip the env variable entirelyAndrew Bartlett1-1/+1
This will cause pidl to use $CC -E instead. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-25build: Remove the forced use of only the first part of the compiler stringAndrew Bartlett1-2/+2
This corrects parts of 378295c3fe813c70815a14c7de608e4a859bd6cc and 301d59caf2ee6f49e108b748b0e38221dec9bb96. This is seen if CC="ccache gcc" and CPP isn't used for some reason. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-24vfs-btrfs: Fix build on 32 bit platforms by using long long typesAndrew Bartlett1-6/+10
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Sun Mar 24 06:17:55 CET 2013 on sn-devel-104
2013-03-24Revert "vfs_btrfs: fix compile on 32-bit platforms."Rusty Russell1-5/+4
This reverts commit fd6d0361d6fef5f8175967ddbae4a2b1d79dfcad. Unreviewed, and Andrew has a better fix. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-03-23ntdb: don't call open hook when re-opening an existing database.Rusty Russell2-13/+22
In particular, the Samba dbwrap wrapper can do this for schannel_store, with the openhook set to clear the database if it can get the lock (which, being in the same process, it can). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Sat Mar 23 09:39:50 CET 2013 on sn-devel-104
2013-03-23vfs_btrfs: fix compile on 32-bit platforms.Rusty Russell1-4/+5
uint64_t are not unsigned longs on 32-bit platforms: [3265/3996] Compiling source3/modules/vfs_btrfs.c ../source3/modules/vfs_btrfs.c: In function ‘btrfs_copy_chunk_send’: ../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Werror=format] ../source3/modules/vfs_btrfs.c:118:3: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int64_t’ [-Werror=format] ../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Werror=format] ../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘uint64_t’ [-Werror=format] ../source3/modules/vfs_btrfs.c: In function ‘btrfs_copy_chunk_recv’: ../source3/modules/vfs_btrfs.c:180:2: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘off_t’ [-Werror=format] cc1: some warnings being treated as errors Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-03-22smbd: Tune "dir" a bit.Volker Lendecke1-6/+19
for i in $(seq 1 20000) ; do echo dir ; done | smbclient //127.0.0.1/tmp -U% without and with this patch: $ time bin/smbd -d0 -i smbd version 4.1.0pre1-GIT-1f139ae started. Copyright Andrew Tridgell and the Samba Team 1992-2013 Beendet real 0m28.342s user 0m10.249s sys 0m10.513s $ time bin/smbd -d0 -i smbd version 4.1.0pre1-GIT-1f139ae started. Copyright Andrew Tridgell and the Samba Team 1992-2013 Beendet real 0m27.348s user 0m9.089s sys 0m10.853s The "real" timestamp is irrelevant, this also contains the time between starting smbd and the smbclient job. It's the "user" time. The result that this patch improves the time spent in user space by 10% is consistent. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Mar 22 22:10:57 CET 2013 on sn-devel-104
2013-03-22Fix bug #9733 - smbcontrol close-share is not working.Jeremy Allison1-0/+3
As part of forcibly disconnecting a client from a share, smbd must atomically call reload_services() to ensure that the entry in the ServicePtrs[] array corresponding to that share is removed if the share was removed from the smb.conf or registry entries. Otherwise the ServicePtrs[] array entry for the share remains active and the client races to auto-reconnect to the share before a second message to reload the smb.conf file can be sent. This has to be done as part of the close-share message processing, as removing the share from the smb.conf file first, then telling the smbd to reload followed by the forcible disconnect message doesn't work as in this sequence of events when the reload message is received the client is still connected to the share, so the ServicePtrs[] entry is still left active. The forcible-disconnect + service reload has to be done together as an atomic operation in order for this to work. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Mar 22 20:10:11 CET 2013 on sn-devel-104
2013-03-22Fix tevent testsuite issue on Solaris.Jeremy Allison1-1/+6
On Solaris/Nexenta/Illumos once a pipe is full it will not be reported as writable until PIPE_BUF (actually on Solaris 4096, which is less than PIPE_BUF) bytes have been read from it. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Mar 22 18:16:45 CET 2013 on sn-devel-104
2013-03-22Solaris/Illumos/Nexenta creates pipes that are bi-directional by default.Jeremy Allison1-10/+16
Ensure the test code will pass against such a system (allow writes/reads going both ways). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-03-22BUG 9735: Fix winbind seperator in upn to username conversion.Andreas Schneider1-1/+1
Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Mar 22 16:18:06 CET 2013 on sn-devel-104
2013-03-21s3:waf fix build on AIXStefan Metzmacher1-1/+1
AIX acl code needs to be built by default on AIX, otherwise smbd will fail to start because of missing symbols This fixes Bug 9557 - build succeeds, but binaries don't run Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Thu Mar 21 16:31:19 CET 2013 on sn-devel-104
2013-03-20s4:torture: let raw.read accept larger reads than 0x10000Stefan Metzmacher1-4/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Mar 20 21:53:20 CET 2013 on sn-devel-104
2013-03-20s4:torture: raw.read fix large reads against windowsStefan Metzmacher1-9/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20s3:selftest: Add LARGE_READX test into our make test infrastructure.Jeremy Allison1-1/+1
Tested against non-encrypted and encrypted connections. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-20s3:torture: Add new LARGE_READX test to investigate large SMBreadX behavior.Jeremy Allison1-1/+337
Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-20s4:smb_server: fix large read_andx requestsStefan Metzmacher1-6/+12
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20s3:smbd: Add functions calc_max_read_pdu()/calc_read_size() to work out the ↵Jeremy Allison1-25/+86
length we should return. LARGE_READX test shows it's always safe to return a short read. Windows does so. Do the calculations to return what will fit in a read depending on what the client negotiated. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-20s3:smbd: Remove server_will_accept_large_read() and erroneous comment.Jeremy Allison1-28/+1
We're going to replace this with a function that calculates the max PDU to return on a read and supports short reads. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-20s3:smbd: Fix off-by 4 error in wrap protection code in create_outbuf()Jeremy Allison1-6/+11
Subtract 4 from smb_size (39) here as the length of the SMB reply following the 4 byte type+length field can be up to 0xFFFFFF bytes. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-20s3:smbd: add some const to req_is_in_chain()Stefan Metzmacher2-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20s3:smbd: remove silly (SMB_OFF_T_BITS == 64) checksStefan Metzmacher1-3/+2
configure will abort if sizeof(off_t) is not 8. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20s3:smbd: keep global_client_caps and max_send from the first successful ↵Stefan Metzmacher1-4/+10
session setup Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20s3:libsmb: let cli_read_andx_create() accept any lengthStefan Metzmacher1-7/+0
It's up to the server to decide the allowed length. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20libcli/smb: smb1cli_inbuf_parse_chain() and smb1cli_conn_dispatch_incoming() ↵Jeremy Allison1-2/+2
should use smb_len_tcp. They have to cope with large READX call replies that have a length greater than smb_len_nbt() can handle. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-20libcli/smb: defer failing for missing NEGOTIATE_SECURITY_SIGNATURES_ENABLEDStefan Metzmacher1-0/+9
Windows servers take a look at the FLAGS2_SMB_SECURITY_SIGNATURES_REQUIRED flag during a session setup and turn on signing if the client requires it. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20s3:libsmb: make use of SMB_CAP_LEGACY_CLIENT_MASK instead of SMB_CAP_CLIENT_MASKStefan Metzmacher1-2/+6
This should allow smbclient to keep using large reads against older Samba versions (<= 3.6.x) and other servers that may also require this. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20libcli/smb: add SMB_CAP_LEGACY_CLIENT_MASK defineStefan Metzmacher1-0/+10
Older Samba releases (<= 3.6.x) expect the client to send CAP_LARGE_READX in order to let the client use large reads. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-20s3:registry accept windows like long hivenamesGregor Beck1-3/+9
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Wed Mar 20 17:08:52 CET 2013 on sn-devel-104
2013-03-20s3:include bump profile memory area version numberChristian Ambach1-1/+1
forgot to bump this earlier when removing the counters for setdir Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-03-18wkssvc: Fix bug 9727, NULL pointer dereferenceVolker Lendecke1-2/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Mar 18 11:39:27 CET 2013 on sn-devel-104
2013-03-17samba-tool group list: add more info to samba-tool group listRicky Nance1-6/+40
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sun Mar 17 12:56:47 CET 2013 on sn-devel-104
2013-03-16Fix bug #9724 - is_encrypted_packet() function incorrectly used inside server.Jeremy Allison1-3/+2
The is_encrypted_packet() function should only be used on the raw received data to determine if a packet came in encrypted. Once we're inside the SMB1 processing code in smbd/reply.c we should be looking at the smb1request->encrypted field to determine if a packet was really encrypted or not. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Mar 16 12:44:44 CET 2013 on sn-devel-104
2013-03-15examples/libsmbclient: Cast mode_t to unsigned int for GNU/Solaris buildAndrew Bartlett1-2/+2
Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Mar 15 20:22:08 CET 2013 on sn-devel-104
2013-03-15s3-lsad: Cast getpid() result to unsigned int for GNU/Solaris buildAndrew Bartlett1-1/+1
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-15s3-epmd: Cast getpid() result to unsigned int for GNU/Solaris buildAndrew Bartlett1-1/+1
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-15vfs_smb_traffic_analyzer: Cast mode_t to unsigned int for GNU/Solaris buildAndrew Bartlett1-2/+2
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-15dbwrap: Cast getpid() result to unsigned int for GNU/Solaris buildAndrew Bartlett1-2/+2
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-15spoolssd: Cast getpid() result to unsigned int for GNU/Solaris buildAndrew Bartlett1-1/+1
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-15s3-smbd/process.c: Cast pid_t result to int for GNU/Solaris buildAndrew Bartlett1-1/+1
Reviewed-by: Jeremy Allison <jra@samba.org>