1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-26 04:23:49 +03:00
Commit Graph

2939 Commits

Author SHA1 Message Date
Volker Lendecke
eb45de167d r17569: Make 'max smbd processes' more robust. Counting on the child to decrement a
tdb entry is not the most reliable way to count children correctly.

This increments the number of children after a fork and decrements it upon
SIGCLD. I'm keeping a list of children just for consistency checks, so that we
at least get a debug level 0 message if something goes wrong.

Volker
2007-10-10 11:38:39 -05:00
Volker Lendecke
2a66abca02 r17568: Reformatting -- more than 100 cols is too much :-) 2007-10-10 11:38:39 -05:00
Jeremy Allison
ff2f1202b7 r17541: When returning a trans2 request, if the "max data
bytes returned" is less than the amount we want
to send, return what we can and set STATUS_BUFFER_OVERFLOW
(doserror ERRDOS,ERRbufferoverflow). Required by
OS/2 to handle EA's that are too large. It's hard
to test this in Samba4 smbtorture as the max data
bytes returned is hard coded at 0xffff (as it is
in the Samba3 client libraries also). I used a
custom version of Samba4 smbtorture to test this
out. Might add a "max data bytes" param to make
this testable in the build farm. Confirmed by
"Guenter Kukkukk (sambaos2)" <sambaos2@kukkukk.com>
and Andreas Taegener <atsamba11@eideltown.de>
that this fixes the issue.
Jeremy.
2007-10-10 11:38:38 -05:00
Günther Deschner
f9bef1f08f r17453: Fix msdfs RPC management (this broke with the autogenerated dfs rpcs).
* Remove "unknown" from dfs_Enum (samba4 dfs IDL updates to follow).

* When encountering an unsupported infolevel the rpc server must reply
with a dfs_info_0 structure and WERR_OK (observed from w2k3 when talking
to nt4).

Guenther
2007-10-10 11:38:34 -05:00
Volker Lendecke
e4b8c79a9d r17452: Some C++ warnings 2007-10-10 11:38:34 -05:00
Simo Sorce
c065341d3f r17408: Let us use netgroups even without a NIS domain but just using files 2007-10-10 11:38:32 -05:00
Volker Lendecke
255475901c r17406: We need to do a translation of winbind separator -> '\\' in
lookup_name_smbconf, otherwise

force user = domain+administrator

can not work. Also attempt to fix the 'valid users = domain+group' bug at the
same time.

Volker
2007-10-10 11:38:32 -05:00
Jeremy Allison
1e1fcb5eb2 r17402: Added lookup_name_smbconf() to be called when looking
up names from smb.conf. If the name is unqualified it
causes the lookup to be done in WORKGROUP\name, then
"Unix [users|groups]"\name rather than searching the
domain. Should fix the problems with "force user"
selecting a domain user by preference.
Jeremy.
2007-10-10 11:38:31 -05:00
Jeremy Allison
e9e711fe37 r17376: Fix bug #3985 - ensure in msdfs we check for our
netbios aliases. Reported by Björn Jacke <bjoern@j3e.de>.
Probably needs to be in 3.0.23b (if Björn approves
of the fix).
Jeremy.
2007-10-10 11:38:29 -05:00
Jeremy Allison
330899ec30 r17367: Reverting the ab code. Note I'm not saying this
code is wrong or bad or anything, just that it
needs to be discussed & reviewed on the samba-technical
list before we add a platform-specific NFSv4 mapping.
That way lies a lot of future pain :-).
Jeremy.
2007-10-10 11:38:29 -05:00
Alexander Bokovoy
c085355c32 r17358: Re-add JFS2 NFS4 ACLs support, move readme for it into AIX-specific examples directory. 2007-10-10 11:38:28 -05:00
Alexander Bokovoy
5b1db01514 r17354: Revert -r 17353 per Volker request while gpfs compatibility layer code will be released. 2007-10-10 11:38:27 -05:00
Alexander Bokovoy
72312cb2e2 r17353: Add support for JFS2 NFS4/AIXC and GPFS acls based on NFSv4 ACLs. 2007-10-10 11:38:27 -05:00
Volker Lendecke
ae6b9b34e5 r17348: Some C++ warnings 2007-10-10 11:38:27 -05:00
Volker Lendecke
641dac4f85 r17347: Some C++ warnings -- 271 left 2007-10-10 11:38:27 -05:00
Volker Lendecke
1e4ee728df r17316: More C++ warnings -- 456 left 2007-10-10 11:38:25 -05:00
Jeremy Allison
a7a0b6ba50 r17314: Optimisation for POSIX locking. If we're downgrading
a POSIX lock (applying a read-lock) and we overlap
pending read locks then send them an unlock message,
we may have allowed them to proceed.
Jeremy.
2007-10-10 11:38:25 -05:00
Jeremy Allison
0661d4e266 r17296: Replace the understandable parts of the quota
code with become_root_uid_only()/unbecome_root_uid_only()
pairs. This code needs working on.....
Jeremy.
2007-10-10 11:38:24 -05:00
Jeremy Allison
b3e0f45488 r17295: Back out the become_root_uid_only change on the POSIX
acls code. I'm pretty sure this was safe, but become_root()
does other things to the token stack that become_root_uid_only()
does not, and as we're going into a vfs redirectred function
I decided it wasn't safe for now.
Jeremy.
2007-10-10 11:38:24 -05:00
Jeremy Allison
4143aa83c0 r17294: Make the code a little cleaner. Instead of using the two
calls make it :

become_root_uid_only()
operation
unbecome_root_uid_only()

saving errno across the second call. Most of our internal
change calls can be replaced with these simple calls.

Jeremy
2007-10-10 11:38:24 -05:00
Jeremy Allison
4ace291278 r17293: After the results from the cluster tests in Germany,
fix the messaging code to call the efficient calls :

save_re_uid()
set_effective_uid(0);

messaging_op

restore_re_uid();

instead of using heavyweight become_root()/unbecome_root()
pairs around all messaging code. Fixup the messaging
code to ensure sec_init() is called (only once) so that non-root
processes still work when sending messages.

This is a lighter weight solution to become_root()/unbecome_root()
(which swaps all the supplemental groups) and should be more
efficient. I will migrate all server code over to using this
(a similar technique should be used in the passdb backend
where needed).

Jeremy.
2007-10-10 11:38:24 -05:00
Volker Lendecke
3ef34468b5 r17254: Simple flattening of an if-statement, no logic change.
Jeremy, I'm sure you will look at this nevertheless :-)

Volker
2007-10-10 11:38:22 -05:00
Jeremy Allison
f326bae3e2 r17249: Ensure we only set the FILE_WRITE_DATA on O_TRUNC
in one place.
Jeremy.
2007-10-10 11:38:22 -05:00
Jeremy Allison
8eed82d5d5 r17248: Ensure we definately add the WRITE_DATA on O_TRUNC.
Jeremy.
2007-10-10 11:38:22 -05:00
Jeremy Allison
d11e71ebcc r17247: When we map generic to specific we need to remember
to copy over the copy of the access_mask, open_access_mask.
Jerry - this is a definate fix for a 3.0.23b and should also
be on the patches page. CIFSFS breaks without this.
Jeremy.
2007-10-10 11:38:22 -05:00
Volker Lendecke
2e400fb007 r17229: Indent-style reformatting -- getting used to the code again :-) 2007-10-10 11:38:20 -05:00
Volker Lendecke
640b4297a4 r17228: Modest reformatting 2007-10-10 11:38:20 -05:00
Jeremy Allison
89b83237b0 r17220: If we're going to fail a write with an errno, make
sure we return -1.
Jeremy.
2007-10-10 11:38:19 -05:00
Jim McDonough
ca0c73f281 r17179: Merge the vl-posixacls tmp branch into mainline. It
modularizes our interface into the special posix API used on
the system. Without this patch the specific API flavor is
determined at compile time, something which severely limits
usability on systems with more than one file system. Our
first targets are AIX with its JFS and JFS2 APIs, at a later
stage also GPFS. But it's certainly not limited to IBM
stuff, this abstraction is also necessary for anything that
copes with NFSv4 ACLs. For this we will check in handling
very soon.

Major contributions can be found in the copyright notices as
well as the checkin log of the vl-posixacls branch. The
final merge to 3_0 post-3.0.23 was done by Peter Somogyi
<psomogyi@gamax.hu>
2007-10-10 11:38:17 -05:00
Jeremy Allison
11bab9d579 r17152: Don't handle the delete pending here, await
reschedule.
Jeremy.
2007-10-10 11:38:16 -05:00
Jeremy Allison
12490fafc7 r17142: Ensure we record the correct can_read/can_write
from the client requested access mask.
Jeremy.
2007-10-10 11:38:15 -05:00
Jeremy Allison
3bcd52a475 r17140: Get rid of the lock release/reacquire code ! Turns out
that create dispositions that cause O_TRUNC break
oplocks. This simplifies the code - although we have
to keep separate the client requested access mask and
the access mask we actually use to open the file.
Jeremy.
2007-10-10 11:38:15 -05:00
Volker Lendecke
40e2679811 r17134: Fix a debug message 2007-10-10 11:38:14 -05:00
Jeremy Allison
788aa15ea2 r17131: Optimisation - when doing a stat open don't open the
file unless we really have to (ie. O_CREAT and file
doesn't exist).
Jeremy.
2007-10-10 11:38:14 -05:00
Jeremy Allison
b3b5aec0ee r17130: Remove unneeded unlock call.
Jeremy.
2007-10-10 11:38:14 -05:00
Jeremy Allison
b7374835e6 r17128: Missed a logic error in my last patch. Ensure we deal with any
oplocks that were granted when we had released the lock. Fix
strange case where stat open grants a batch oplock on file
create, but grants no oplock on file open.
Jeremy.
2007-10-10 11:38:14 -05:00
Jeremy Allison
8171c4c404 r17125: Drastic problems require drastic solutions. There's
no way to get all the cases where kernel oplocks are
on and we can't open the file and get the correct
semantics (think about the open with truncate with
an attribute only open - we'd need a vfs change to
add the truncate(fname, len) call). So always drop
the share mode lock before doing any real fd opens and
then re-acquire it afterwards. We're already dealing
with the race in the create case, and we deal with
any other races in the same way. Volker, please
examine *carefully* :-). This should fix the problems
people reported with kernel oplocks being on.
Jeremy.
2007-10-10 11:38:13 -05:00
Jeremy Allison
0451a170c9 r17108: Make the default timeout parameter for lock waiting
be lp_lock_spin(). lock spin count is no longer
used. I'll update the man pages.
Jeremy.
2007-10-10 11:38:12 -05:00
Jeremy Allison
98d8d9399b r17107: Make the 200 ms timeout value tunable in local.h...
Might need to be a parameter ?
Jeremy.
2007-10-10 11:38:12 -05:00
Jeremy Allison
b5aaff6659 r17106: Match Windows timing values on locks.
Jeremy.
2007-10-10 11:38:12 -05:00
Jeremy Allison
b81d6d1ae9 r17105: Fix the race Volker found - we had a non-locked
region between detecting a pending lock was needed
and when we added the blocking lock record. Make
sure that we hold the lock over all this period.
Removed the old code for doing blocking locks on
SMB requests that never block (the old SMBlock
and friends).
Discovered something interesting about the strange
NT_STATUS_FILE_LOCK_CONFLICT return. If we asked
for a lock with zero timeout, and we got an error
of NT_STATUS_FILE_LOCK_CONFLICT, treat it as though
it was a blocking lock with a timeout of 150 - 300ms.
This only happens when timeout is sent as zero and
can be seen quite clearly in ethereal. This is the
real replacement for old do_lock_spin() code.
Re-worked the blocking lock select timeout to correctly
use milliseconds instead of the old second level
resolution (far too coarse for this work).
Jeremy.
2007-10-10 11:38:12 -05:00
Jeremy Allison
b21ca265a2 r17100: Ooops. Fix the build...
Jeremy.
2007-10-10 11:38:11 -05:00
Jeremy Allison
f1a9cf075b r17098: Samba3 now cleanly passes Samba4 RAW-LOCK torture
test. Phew - that was painful :-). But what it means
is that we now implement lock cancels and I can add
lock cancels into POSIX lock handling which will fix
the fast/slow system call issue with cifsfs !
Jeremy.
2007-10-10 11:38:11 -05:00
Volker Lendecke
0a138888ad r17096: Simplify share_access_check a bit: It takes the sharename instead of the snum,
and the decision which token to use (conn or vuser) does not really belong
here, it is better done in the two places where this is called.

Volker
2007-10-10 11:38:11 -05:00
Jeremy Allison
f62c01316e r16990: Fix bug #3921 spotted by jason@ncac.gwu.edu. Correctly
obey blocking/non-blocking request for POSIX locks.
Jeremy.
2007-10-10 11:19:16 -05:00
Jeremy Allison
883bb398e5 r16968: The function parse_processed_dfs_path() is dependent on the
fact that check_path_syntax() will convert '\\' characters to '/'.
When POSIX pathnames have been selected this doesn't happen, so we
must look for the unaltered separator of '\\' instead of the modified '/'.
Stevef please check this with the CIFSFS MS-DFS code !
Jeremy
2007-10-10 11:19:16 -05:00
Jeremy Allison
9dafb7f48c r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
2007-10-10 11:19:14 -05:00
Günther Deschner
6bf350895a r16797: Add msdfs proxy junctions in the netdfs rpc enumeration.
Guenther
2007-10-10 11:19:11 -05:00
Jeremy Allison
95e5ace6b4 r16789: Fix bug #3909, when using ea's getting a directory tries to
read ea's from an msdfs link. Stop it from doing that.
Jerry please merge to 3.0.23.
Jeremy.
2007-10-10 11:19:10 -05:00
Jeremy Allison
1e5042d4c0 r16616: Klocwork #2025. Stop null deref. I actually don't
think this can happen in real life but the code is
too complicated to be sure....
Jerry please merge this for 3.0.23.
Jeremy.
2007-10-10 11:19:03 -05:00