1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-14 01:57:53 +03:00

2875 Commits

Author SHA1 Message Date
Jeremy Allison
932e337db8 r12213: Final fix for #3303 - send rename messages to smbd's
that have open file handles to allow them to correctly
implement delete on close. There is a further correctness
fix I'm intending to add to this to cope with different share
paths, but not right now...
Jeremy.
2007-10-10 11:05:49 -05:00
Jeremy Allison
9d93af713f r12203: Add the share path into the sharemode db. This involves
revving the minor version number for libsmbsharemodes (we
now have a new _ex interface that takes the share path
as well as the filename). Needed for #3303. Some code written
by SATOH Fumiyasu <fumiya@samba.gr.jp> included in the changes
to locking/locking.c. The smbstatus output is a bit of a mess
and needs overhauling...
Jeremy.
2007-10-10 11:05:49 -05:00
Jeremy Allison
22e3300911 r12194: Ensure that when we set a connection path we've canonicalized
the name (must be abolute - start with /, must not end in /,
must have ./ and ../ removed). Of course for realpath resolved
paths this won't be the case but for others we need this name
to be canonicalized. This name is going into the sharemode db
for #3303 so needs to be in a normalized format.
Jeremy.
2007-10-10 11:05:48 -05:00
Volker Lendecke
b15815c804 r12163: Change lookup_sid and lookup_name to return const char * instead of char *,
use a temporary talloc_ctx for clarity.

Volker
2007-10-10 11:05:46 -05:00
Jeremy Allison
d1a9d0587c r12160: The filename parameter to get_share_mode_lock is going
to become very important as we fix #3303, so make sure
we don't accidently set it here.
Jeremy.
2007-10-10 11:05:46 -05:00
Lars Müller
519ed7ca0e r12076: Ensure setmntent() returns with != NULL in the disk_quotas() Linux
version.

The IRIX 6.2 version is still without this check as I'm not sure if
setmntent() is implemented in the same way.
2007-10-10 11:05:43 -05:00
Volker Lendecke
9f99d04a54 r12051: Merge across the lookup_name and lookup_sid work. Lets see how the build farm
reacts :-)

Volker
2007-10-10 11:05:43 -05:00
Jeremy Allison
c65b752604 r12043: It's amazing the warnings you find when compiling on a 64-bit
box with gcc4 and -O6...
Fix a bunch of C99 dereferencing type-punned pointer will break
strict-aliasing rules errors. Also added prs_int32 (not uint32...)
as it's needed in one place. Find places where prs_uint32 was being
used to marshall/unmarshall a time_t (a big no no on 64-bits).
More warning fixes to come.
Thanks to Volker for nudging me to compile like this.
Jeremy.
2007-10-10 11:05:42 -05:00
Jeremy Allison
abc21cc732 r11945: Make us follow the newly documented pathname processing rules:
"As a special case for directories with large numbers of files, if the
case options are set as follows, "case sensitive = yes", "case
preserve = no", "short preserve case = no" then the "default case"
option will be applied and will modify all filenames sent from the client
when accessing this share."
This is needed as fixing the case preserve rules to only apply to
new filenames broke the large directory fix. Glad we caught this
before release. Thanks to jht for this one.
Jeremy.
2007-10-10 11:05:38 -05:00
Jeremy Allison
8ee569626b r11943: Don't reset attrs to zero in EA get - we are adding
to the attr list not resetting it.
Jeremy.
2007-10-10 11:05:38 -05:00
Volker Lendecke
5629ca1623 r11909: Implement 'reset on zero vc'. This kills other connections when a session
setup comes in with the vc (virtual connection) field set to zero. This is
done by Windows, probably you can tweak that by some registry key.

	This boolean option controls whether an incoming session setup
	should kill other connections coming from the same IP. This matches
        the default Windows 2003 behaviour.

	Setting this parameter to yes becomes necessary when you have a flaky
	network and windows decides to reconnect while the old connection
	still has files with share modes open. These files become inaccessible
	over the new connection.

	The client sends a zero VC on the new connection, and Windows 2003
	kills all other connections coming from the same IP. This way the
	locked files are accessible again.

	Please be aware that enabling this option will kill connections behind
	a masquerading router.

Volker
2007-10-10 11:05:34 -05:00
Jeremy Allison
ba931a0151 r11861: Fix inspired by Thomas Neumann <t.neumann@iku-ag.de> to ensure that
default case applies only to new files and correctly examines 8.3
and long names.
Jeremy.
2007-10-10 11:05:31 -05:00
Günther Deschner
43b57715e9 r11846: Destroy the TALLOC_CTX on error in the Kerberos session setup and give a
more precise inline comment why PAC verification may fail.

Guenther
2007-10-10 11:05:29 -05:00
Jeremy Allison
52b6f0db2e r11767: Doesn't need to be exported.
Jeremy.
2007-10-10 11:05:27 -05:00
Jeremy Allison
61444049e1 r11718: Filter stored DOS attributes by SAMBA_ATTRIBUTES_MASK (0x7f).
Jeremy.
2007-10-10 11:05:25 -05:00
Gerald Carter
8bead2d282 r11661: Store the INFO3 in the PAC data into the netsamlogon_cache.
Also remove the mem_ctx from the netsamlogon_cache_store() API.

Guenther, what should we be doing with the other fields in
the PAC_LOGON_INFO?
2007-10-10 11:05:23 -05:00
Paul Green
46674ca21d r11657: Tiny improvement to debug error message in dir_check_ftype. 2007-10-10 11:05:23 -05:00
Gerald Carter
b0a2d43b60 r11655: Two small fixes
* remove redundant call to sub_set_smb_name() in session setup code.
* Fix lockup when running 'wbinfo -t' on a Samba PDC.  Cause
  was new authenticated session setup from winbindd which
  resulted in a mangled username (machine_) that was not found
  in the local files and so was queiued up to nss_winbindd.
  Deadlock....
  So now make sure to keep the trailing '$' for machine account
  names when calling sub_set_smb_name().
2007-10-10 11:05:23 -05:00
Jeremy Allison
414303bc02 r11511: A classic "friday night check-in" :-). This moves much
of the Samba4 timezone handling code back into Samba3.
Gets rid of "kludge-gmt" and removes the effectiveness
of the parameter "time offset" (I can add this back
in very easily if needed) - it's no longer being
looked at. I'm hoping this will fix the problems people
have been having with DST transitions. I'll start comprehensive
testing tomorrow, but for now all modifications are done.
Splits time get/set functions into srv_XXX and cli_XXX
as they need to look at different timezone offsets.
Get rid of much of the "efficiency" cruft that was
added to Samba back in the day when the C library
timezone handling functions were slow.
Jeremy.
2007-10-10 11:05:19 -05:00
Jeremy Allison
cab76c3c33 r11451: Fix -O1 "might be using uninitialized" errors.
Jeremy.
2007-10-10 11:05:16 -05:00
Jeremy Allison
f22822790c r11448: Move decl before code.
Jeremy.
2007-10-10 11:05:16 -05:00
Jeremy Allison
7edb26e765 r11428: Fix bug #3192 by actually hooking up the dfree caching
function. Oops.
Jeremy.
2007-10-10 11:05:15 -05:00
Jeremy Allison
4cd8e2a96b r11420: Fix issue pointed out by Dina Fine <dina@exanet.com>. We can
only tell at parse time from the wire if an incoming name
has wildcards or not. If it's a mangled name and we demangle
the demangled name may contain wildcard characters. Ensure
these are ignored.
Jeremy.
2007-10-10 11:05:15 -05:00
Jeremy Allison
71c037dfbb r11389: Attempt to fix bug #3212 - ignore bogus OS/2 EA set values on
trans2_mkdir/trans2_open/trans2_setfilepathingo.
Jeremy.
2007-10-10 11:05:14 -05:00
Jeremy Allison
238b35d2e6 r11346: Fix for bug found by Dina Fine. If in case sensitive mode then
the mangle cache is no good (3 letter extension could be wrong
case - so don't demangle in this case - leave as mangled and
allow the mangling of the directory entry read (which is done
case insensitively) to match instead. This will lead to more
false positive matches but we fail completely without it.
Jeremy.
2007-10-10 11:05:13 -05:00
Jeremy Allison
e959a5be39 r11344: I don't think share mode conflicts occur on deleting
a directory when you've got permissions. Need to write
a smbtorture test for this.
Jeremy.
2007-10-10 11:05:13 -05:00
Jeremy Allison
1134abbbb3 r11341: Put directory opens into the share mode db so we
can treat them similarly to file opens (delete on
close, share mode violations etc.). This fixes bug
#3216 I will up the default hash size on the locking
db in a later commit as this means more entries.
Jeremy.
2007-10-10 11:05:13 -05:00
Jeremy Allison
f68ff32630 r11283: Move to using sival_int from sival_ptr. Part of bug #2922.
Jeremy.
2007-10-10 11:05:10 -05:00
Jeremy Allison
7e1318e09b r11237: Fix acl evaluation bug found by Marc Cousin <mcousin@sigma.fr>
We should only check the S_IWGRP permissions if we haven't already
seen an owning group SMB_ACL_GROUP_OBJ ace entry. If there is an
SMB_ACL_GROUP_OBJ ace entry then the group bits in st_gid are
the same as the SMB_ACL_MASK bits, not the SMB_ACL_GROUP_OBJ
bits. Thanks to Marc Cousin <mcousin@sigma.fr> for pointing
this out.
Jeremy.
2007-10-10 11:05:09 -05:00
Jeremy Allison
797b9f47e9 r11233: Forgot to add the statvfs file. Oops.
Jeremy.
2007-10-10 11:05:08 -05:00
Jeremy Allison
af85458067 r11232: Added ab's POSIX statvfs vfs call. Sorry for the delay ab.
Jeremy.
2007-10-10 11:05:08 -05:00
Günther Deschner
908ac0c9ec r11213: Fix the build
Guenther
2007-10-10 11:05:06 -05:00
Jeremy Allison
49ef8b88a3 r11190: Fix enhancement request #3192.
This does 2 things.
1). Makes dfree command a per-share parameter (it should be anyway IMHO).
2). Adds a "dfree cache time" parameter in seconds that specifies how long a
dfree command output should be cached for. Default is zero (no caching).
Jeremy.
2007-10-10 11:05:06 -05:00
Günther Deschner
a8d5d6b845 r11183: add small helper function to return a PAC_LOGON_INFO.
Guenther
2007-10-10 11:05:06 -05:00
Jeremy Allison
d720867a78 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
2007-10-10 11:05:02 -05:00
Gerald Carter
1bcf7e82ed r11060: merging new eventlog code from trunk 2007-10-10 11:04:59 -05:00
Jeremy Allison
da4238d18c r10979: After discussions on IRC about profile shares,
added new parameter : map readonly = [yes|no|permissions]
If yes: map inverse of user "w" bit to mean readonly.
If no: never set DOS readonly bit.
If permissions: check file permissions for user and set readonly
bit if the current user cannot write.
If store dos attributes is set to yes then this parameter
is ignored.
Jeremy.
2007-10-10 11:04:59 -05:00
Jeremy Allison
57ed94e6e4 r10974: Get closer to trying to fix #1825 (PcoketPC spnego bug). Ensure we
set keylen to zero if no spnego.
Jeremy.
2007-10-10 11:04:58 -05:00
Jeremy Allison
38a70185b7 r10947: Fix bugs #3133 and #1828 - SPNEGO not working with PocketPC 2003.
Our sessionsetup code now handles raw NTLMSSP connects, so we can go
back to doing what W2K3 does here which is to send no OID's in
the negprot reply when not in a security=ads mode.
Jeremy.
2007-10-10 11:04:57 -05:00
Jeremy Allison
5647a5d4b0 r10943: Unused variable. Bug #3160 from jason@ncac.gwu.edu
Jeremy.
2007-10-10 11:04:57 -05:00
Jeremy Allison
b2e22e7d12 r10930: Fix erroneous debug spotted by Herb.
Jeremy.
2007-10-10 11:04:56 -05:00
Gerald Carter
1599fc38ab r10921: BUG 3070: fix crash bug in qfsinfo when retrieving quota info 2007-10-10 11:04:56 -05:00
Gerald Carter
b7de9a6c69 r10901: BUG 3145: Fix build issue regarding quota support on Solaris 2007-10-10 11:04:55 -05:00
Jeremy Allison
1c52bf875c r10888: We've already checked 'CAN_WRITE' so we don't need to do it again.
Jeremy.
2007-10-10 11:04:55 -05:00
Jeremy Allison
a33f4f0d2a r10885: Fix bug where read-only share files are always seen as
read-only. Noticed by Andrew Bartlett.
Jeremy
2007-10-10 11:04:55 -05:00
Gerald Carter
ef3845366b r10822: updating copyright info 2007-10-10 11:04:55 -05:00
Jeremy Allison
62ba345425 r10750: Ensure we match W2K3 in forcing DOS errors in a couple of cases.
Jeremy.
2007-10-10 11:04:53 -05:00
Jeremy Allison
0e8cf8eef5 r10749: Remove one more Samba4 smbtorture RAW-OPEN difference from W2K3.
Jeremy.
2007-10-10 11:04:51 -05:00
Jeremy Allison
5d7ab9a17e r10744: Fix for the second incarnation of bug #3088, pushed by Alex Masterov
<alex@infobit.ru>. A fcbopen specific part of the code was erroneously
being called as part of the mainline open. Note, that this patch
superceeds and replaces the fix that Volker added for this bug
(which he added a Samba4 torture test for ) :

"Fix a race condition in Samba 3. If two files are opened simultaneously with
NTCREATEX_DISP_CREATE (create if not exists, else fail) they might end up with
two or more times NT_STATUS_OK as EEXIST is not correctly handled."

Jeremy.
2007-10-10 11:04:51 -05:00
Jeremy Allison
f391f065b2 r10693: Fix bug #3129, reported by Adam Porter <sambabugzilla@alphapapa.net>.
Rotten error message caused hours of wasted time.
Jeremy.
2007-10-10 11:04:50 -05:00