1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

3534 Commits

Author SHA1 Message Date
Volker Lendecke
9c6f9fa28a r23186: Checkin on behalf of Tridge:
Change notify.tdb to use dbwrap
(This used to be commit 3a08940387)
2007-10-10 12:22:53 -05:00
Volker Lendecke
fb76516ccd r23185: Try to fix the IRIX build, also add the forgotten file_id.c in .26
(This used to be commit 5360e6405b)
2007-10-10 12:22:53 -05:00
Volker Lendecke
e8156439f2 r23183: Check in a change made by Tridge:
This replaces the internal explicit dev/ino file id representation by a
"struct file_id". This is necessary as cluster file systems and NFS
don't necessarily assign the same device number to the shared file
system. With this structure in place we can now easily add different
schemes to map a file to a unique 64-bit device node.

Jeremy, you might note that I did not change the external interface of
smb_share_modes.c.

Volker
(This used to be commit 9b10dbbd5d)
2007-10-10 12:22:52 -05:00
Volker Lendecke
ba0bce2c6f r23173: Convert sessionid.tdb to ctdb. The 3.0.26 patch is a bit larger because
it brings across the tdb-based list_sessions
(This used to be commit 0153386c1a)
2007-10-10 12:22:52 -05:00
Volker Lendecke
fff51a9af2 r23172: Change shutdown_other_smbds to use connections_traverse instead of
session_traverse.
(This used to be commit ccb5eb245e)
2007-10-10 12:22:52 -05:00
Volker Lendecke
054bf2fc8b r23171: Convert connections.tdb to dbwrap
(This used to be commit 80a1f43825)
2007-10-10 12:22:52 -05:00
Volker Lendecke
14e25f10d6 r23168: Move the lp_max_connections() into service.c.
(This used to be commit 4afe37d431)
2007-10-10 12:22:51 -05:00
Volker Lendecke
f3c477c631 r23167: Remove an unused parameter
(This used to be commit 3452a870d5)
2007-10-10 12:22:51 -05:00
Jeremy Allison
f3de07503a r23151: Re-arrange the logic so it looks identical to the
"file existed" case above. This has no functional
change but is easier to see that it's doing the
same thing.
Jeremy.
(This used to be commit 0a7d8362be)
2007-10-10 12:22:49 -05:00
Jeremy Allison
4c795b293d r23150: Fix Samba3 in the build farm again. In the case where the
file was being created and we go into the race condition check,
we were testing for compatible open modes, but were not breaking
oplocks in the same way as if the file existed. This meant that
we weren't going into the code path that sets fsp->oplock = FAKE_LEVEL_II_OPLOCK
if the client didn't ask for an oplock on file create. We need
to do this as internally it's what Windows does.
Jeremy.
(This used to be commit 9b9513856e)
2007-10-10 12:22:49 -05:00
Jeremy Allison
4aa857d875 r23107: Fix renames on file descriptors that are supposed to overwrite the
target. Needs merging for 3.0.25a (sorry).
Jeremy.
(This used to be commit a56bce3d44)
2007-10-10 12:22:46 -05:00
Jeremy Allison
f5038178a9 r23106: Use lchown for symlinks.
Jeremy.
(This used to be commit b98175440b)
2007-10-10 12:22:46 -05:00
Jeremy Allison
dbfd6bf8c8 r23100: Implement the delete on close semantics I've just tested for
in Samba4 smbtorture. Fix rename on an open file handle.
Needed for 3.0.25a.
Jeremy.
(This used to be commit a301467d5f)
2007-10-10 12:22:46 -05:00
Jeremy Allison
918b6ea082 r23088: Fix rename for cifsfs client. This may be needed for
3.0.25a.
Jeremy.
(This used to be commit 02e4f6b0f1)
2007-10-10 12:22:44 -05:00
Jeremy Allison
828cb24004 r23087: Fix POSIX setfilepathinfo to use lstat, not stat.
Still missing lchown (will add this for 3.0.26).
Don't merge for 3.0.25a - possibly 3.0.25b (if it
exists).
Jeremy.
(This used to be commit f546750176)
2007-10-10 12:22:44 -05:00
Volker Lendecke
ac3f08ddbe r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more
than one place, so I wanted a decent routine to marshall a message_rec
struct which was not there before.

Tridge, this seems about the same speed as it used to be before, the
librpc/ndr overhead in my tests was under the noise.

Volker
(This used to be commit eaefd00563)
2007-10-10 12:22:17 -05:00
Jeremy Allison
e67c8d09fd r23016: Remove extra & - thanks to Volker for spotting this.
Jeremy.
(This used to be commit c2c970fd50)
2007-10-10 12:22:15 -05:00
Volker Lendecke
4d5f58c2b9 r23015: Make message_(de)register static to messages.c
(This used to be commit a8082a3c7c)
2007-10-10 12:22:15 -05:00
Jeremy Allison
01a7017d7b r23014: For all branches, ensure that if we're blocked on a POSIX
lock we know nothing about that we retry the lock every
10 seconds instead of waiting for the standard select
timeout. This is how we used to (and are supposed to)
work.
Jeremy.
(This used to be commit fa18fc25a5)
2007-10-10 12:22:15 -05:00
Jeremy Allison
63e74f3059 r23007: Ensure we don't allow large read over the possible
packet size.
Jeremy.
(This used to be commit 5d465dd2d5)
2007-10-10 12:22:14 -05:00
Gerald Carter
0e9210d0ea r22978: Don't use current_user to prep the security ctx in change_to_user
since any SID/uid/gid translation calls will reset the struct when
popping the security ctx.  This should fix the standalone server
configuration issues reported by David Rankin (thanks for the logs).
(This used to be commit 63cb25bad1)
2007-10-10 12:22:12 -05:00
Volker Lendecke
e95942ed84 r22954: More messaging_register
(This used to be commit 9b8df24107)
2007-10-10 12:22:11 -05:00
Volker Lendecke
81acb2d805 r22942: Some message_register -> messaging_register conversions
(This used to be commit 65335a4206)
2007-10-10 12:22:10 -05:00
Jeremy Allison
2b2eec4cfc r22925: Sync read_and_X with 3.0.26 code (use setup_readX_header()).
Jeremy.
(This used to be commit e1052c0e3d)
2007-10-10 12:22:09 -05:00
Jeremy Allison
c3bde5a591 r22922: Move "normal_read:" label out of ifdef guard. Fix the build.
Jeremy.
(This used to be commit 3c1ccc68f0)
2007-10-10 12:22:08 -05:00
Jeremy Allison
32106b2395 r22920: Add in the UNIX capability for 24-bit readX, as discussed
with the Apple guys and Linux kernel guys. Still looking
at how to do writeX as there's no recvfile().
Jeremy.
(This used to be commit a53268fb20)
2007-10-10 12:22:08 -05:00
Volker Lendecke
8c3f8e5697 r22911: Pass a messaging_context to message_send_all
(This used to be commit cc92ce665d)
2007-10-10 12:22:07 -05:00
Volker Lendecke
84758bd1f8 r22908: All callers of message_init now also call messaging_init. Unify those.
(This used to be commit 330946ad23)
2007-10-10 12:22:07 -05:00
Volker Lendecke
8f9369f2e6 r22900: Convert profile/ to messaging_send_pid/messaging_register
(This used to be commit edbeea5207)
2007-10-10 12:22:05 -05:00
Volker Lendecke
fad7dd8a60 r22868: Replace some message_send_pid calls with messaging_send_pid calls. More
tomorrow.
(This used to be commit 74fa57ca5d)
2007-10-10 12:22:04 -05:00
Volker Lendecke
b92064fcfd r22846: Chunk one to replace message_send_pid with messaging_send: Deep inside
locking/locking.c we have to send retry messages to timed lock holders.
The majority of this patch passes a "struct messaging_context" down
there. No functional change, survives make test.
(This used to be commit bbb5084146)
2007-10-10 12:22:02 -05:00
Volker Lendecke
b4a7b7a888 r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; and
replace all data_blob(NULL, 0) calls.
(This used to be commit 3d3d61687e)
2007-10-10 12:22:01 -05:00
Andrew Tridgell
2383ffce69 r22784: fixed change notify for delete on close
(This used to be commit 6f52435a72)
2007-10-10 12:21:57 -05:00
Jeremy Allison
1e6e3f8279 r22765: Fix from Alison Winters <alisonw@sgi.com> for missing return
in sendfilereadbraw.
Jeremy.
(This used to be commit b523e782b0)
2007-10-10 12:21:55 -05:00
Volker Lendecke
4aa44f7475 r22761: This introduces lib/conn_tdb.c with two main functions: connections_traverse
and connections_forall. This centralizes all the routines that did individual
tdb_open("connections.tdb") and direct tdb_traverse.

Volker
(This used to be commit e43e94cda1)
2007-10-10 12:21:55 -05:00
Volker Lendecke
87d18ac488 r22755: Second half of r22754. As it stands now, string_replace expects a
pstring. Give it one, although I hate putting it in :-)

Thanks to Tom Bork! :-)
(This used to be commit f4ea3fd365)
2007-10-10 12:21:54 -05:00
Volker Lendecke
76ce309234 r22751: Next step for the cluster merge: sessionid.tdb should contain a 'struct
server_id' instead of a 'uint32 pid'
(This used to be commit be7bac55c3)
2007-10-10 12:21:54 -05:00
Volker Lendecke
7192160599 r22747: Fix some C++ warnings
(This used to be commit a66a04e9f1)
2007-10-10 12:21:54 -05:00
Volker Lendecke
e6383f4762 r22736: Start to merge the low-hanging fruit from the now 7000-line cluster patch.
This changes "struct process_id" to "struct server_id", keeping both is
just too much hassle. No functional change (I hope ;-))

Volker
(This used to be commit 0ad4b1226c)
2007-10-10 12:21:52 -05:00
Volker Lendecke
bf7008abb8 r22695: Dummy checkin (reformatting) to make the AIX hosts retry.
(This used to be commit cd55ccef6a)
2007-10-10 12:21:46 -05:00
Volker Lendecke
c4d42829a5 r22693: Always compile before checkin.... I've now installed dmapi on my laptop :-)
(This used to be commit 7460511c4e)
2007-10-10 12:21:46 -05:00
Volker Lendecke
fb56443427 r22691: Fix a 64-bit warning and a const const discard warning
(This used to be commit 3a2ca1b1b8)
2007-10-10 12:21:46 -05:00
Jeremy Allison
f5d6c8e0d7 r22611: Fix from Jens Nissen <jens.nissen@gmx.net>. Fix bad
memory leak I introduced into acl code, also remove
redundent extra check for global_sid_System :

global_sid_System == S-1-5-18 which is already
included in the check for a domain of
global_sid_NT_Authority == S-1-5

Jeremy.
(This used to be commit 10649540ac)
2007-10-10 12:19:50 -05:00
Jeremy Allison
56a5d05b8b r22590: Make TALLOC_ARRAY consistent across all uses.
That should be it....
Jeremy.
(This used to be commit 603233a98b)
2007-10-10 12:19:49 -05:00
Volker Lendecke
e26dee48f0 r22561: Fix a memleak in lanman.c: Nobody would free the session_list.
Volker
(This used to be commit 5d428400f7)
2007-10-10 12:19:45 -05:00
Jeremy Allison
12ba88574b r22542: Move over to using the _strict varients of the talloc
calls. No functional changes. Looks bigger than it is :-).
Jeremy.
(This used to be commit f6fa3080fe)
2007-10-10 12:19:44 -05:00
Volker Lendecke
322ca3b933 r22533: Use lib functions where we have them
(This used to be commit dc18ab2f34)
2007-10-10 12:19:43 -05:00
Jeremy Allison
2ad66881df r22502: Fix bug #4536 - delete symlinks to a directory correctly.
Jeremy.
(This used to be commit dcc6517d9d)
2007-10-10 12:19:40 -05:00
James Peach
c620832983 r22495: Create wrapper to hide the details of obtaining a set of sockets
to listen on.
(This used to be commit 29a16b2acb)
2007-10-10 12:19:39 -05:00
Jeremy Allison
0845fa4085 r22493: Fix horrible memory corruption bug with CIFS POSIX open/mkidr.
Found by SteveF + valgrind :-). Jerry - essential for rc3.
Jeremy.
(This used to be commit b01c1c4618)
2007-10-10 12:19:39 -05:00
Jeremy Allison
4742fa9366 r22492: Add objectid code.
Jeremy.
(This used to be commit d3df922038)
2007-10-10 12:19:39 -05:00
Jeremy Allison
7d859f04f2 r22491: Fix the build (3.0.25 and 3.0 are different here).
Jeremy.
(This used to be commit c34c291194)
2007-10-10 12:19:38 -05:00
Jeremy Allison
1ddcc5c06a r22490: Fix a couple of bugs found whist investigating CSC Vista issues.
Ensure we correctly NULL out allocation size fields. Allow
QFILEINFO on pipes (Vista bug ?). Jerry - don't automatically
merge for 3.0.25.
Jeremy.
(This used to be commit a275778152)
2007-10-10 12:19:38 -05:00
Jeremy Allison
5e7174a2c8 r22481: Move check for non-mappable SIDs to after sid_to_uid,
sid_to_gid mapping, add LocalSystem to non-mappable
list.
Jeremy.
(This used to be commit 805f01464f)
2007-10-10 12:19:38 -05:00
Volker Lendecke
2541e0d590 r22458: Fix a comment
(This used to be commit f5ccec4228)
2007-10-10 12:19:34 -05:00
James Peach
44f5211c17 r22418: Support running under launchd. We abstract the method of obtaining
sockets to listen on a little, because in the launchd case these
are provided for us. We also add an idle timeout so that a daemon
can exit after a period of inactivity.
(This used to be commit fc8589a337)
2007-10-10 12:19:33 -05:00
James Peach
8a22b1f0ea r22417: Refactor the various daemon run-mode options to make the semantics
of the various flags explicit.
(This used to be commit 19c929c633)
2007-10-10 12:19:33 -05:00
Michael Adam
e95c34dc6b r22411: Fix the build:
Prototype of create_aio_ex_read, set_message and definition of
UNIXERROR have changed in r22389 and r22391? to require an additional
"inbuf" argument. Some places in smbd/aio.c had not been adapted.

This patch fixes the build.

Michael
(This used to be commit 9de1af6dc8)
2007-10-10 12:19:32 -05:00
Herb Lewis
80576572cc r22395: allow profiling level to be set on startup
(This used to be commit f8f51e8648)
2007-10-10 12:19:32 -05:00
Jeremy Allison
0829e1ad1c r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
(This used to be commit 2d80a96120)
2007-10-10 12:19:30 -05:00
Jeremy Allison
dc90cd89a7 r22389: Start preparing for multiple encryption contexts in the
server. Allow server to reflect back to calling client
the encryption context that was sent.
Jeremy.
(This used to be commit b49e90335d)
2007-10-10 12:19:30 -05:00
Jeremy Allison
d47868cb5e r22352: Wow - working gss SMB sealing !
Jeremy.
(This used to be commit abcb2a4b07)
2007-10-10 12:19:28 -05:00
Jeremy Allison
226d96337f r22351: Making progress in tests...
Jeremy.
(This used to be commit f1726e04eb)
2007-10-10 12:19:28 -05:00
Jeremy Allison
1adbf4af06 r22350: Add some helpful debug messages.
Jeremy.
(This used to be commit bf2e6bd82d)
2007-10-10 12:19:28 -05:00
Jeremy Allison
9812a7e32e r22327: Finish the gss-spnego part of the seal code. Now
for testing....
Jeremy.
(This used to be commit 1c1f5360b6)
2007-10-10 12:19:27 -05:00
Jeremy Allison
2da54a66b9 r22291: Fix off-by-one in tconX parsing.
Jeremy.
(This used to be commit bc6ac4feac)
2007-10-10 12:19:24 -05:00
Jeremy Allison
74a07edb50 r22266: Fix bug #4512 - we were returning a volume label greater than
32 unicode chars. Windows XP doesn't like that :-).
Jeremy
(This used to be commit e59b5276b5)
2007-10-10 12:19:23 -05:00
Stefan Metzmacher
3678d69b82 r22262: fix the build on systems without GSS_C_NT_HOSTBASED_SERVICE
metze
(This used to be commit 402704b629)
2007-10-10 12:19:22 -05:00
Volker Lendecke
a633b42592 r22213: We can't use become_root() here, as it does DEBUG()
itself. become_root_uid_only did not :-)

Revert 21868, we need to find a better way.

Volker
(This used to be commit 629f966714)
2007-10-10 12:19:20 -05:00
Gerald Carter
1790c67780 r22149: BUG 4500: patch from Jorge Santos <jorge_a_santos@hotmail.com>
to fix compile bug ni quotas.c (typo calling unbecome_root()).
(This used to be commit 22d550d62b)
2007-10-10 12:19:16 -05:00
Jeremy Allison
a098724734 r22145: Fix bug #4494 - reported by Kevin Jamieson <bugzilla@kevinjamieson.com>.
If returning a mapped UNIX error from sendfile, don't call chain_reply.
Jeremy.
(This used to be commit 38404c990d)
2007-10-10 12:19:16 -05:00
Jeremy Allison
4838055e5f r22132: I hate inefficiency. Don't call conv_str_size()
on every pread/sendfile call, initialize these
variables in an allocated struct at connection
time and just refer to them directly.
Jeremy.
(This used to be commit 85df3fca68)
2007-10-10 12:19:15 -05:00
Jeremy Allison
6a3e72aa69 r22129: Fix the nttrans create extended response for pipes
and files (tested with Win32 code). Bug #4404 should
now be dead :-).
Jeremy.
(This used to be commit 40a86a5666)
2007-10-10 12:19:15 -05:00
Jeremy Allison
2ca369e0a6 r22128: Fix the pipe open response with EXTENDED_RESPONSE_REQUIRED
set. Only the NTTrans create left to fix for csc.
Jeremy.
(This used to be commit 7856db9fce)
2007-10-10 12:19:15 -05:00
Jeremy Allison
8710c0ddd2 r22124: Wow - NTCreateX sets the word count to 42, but returns 50 on
the wire. Strange.... But now we're returning Windows compatible
extended info. Next to fix the pipe returns and NTTrans Creates.
Jeremy.
(This used to be commit 57e46f2f80)
2007-10-10 12:19:14 -05:00
Jeremy Allison
bd472a542a r22123: Try and fix the csc (#4404) bug by supporting the extended
response to NTCreateX - need to fix this also for
pipe open and NTTransCreate as well so this isn't
finished.
Jeremy.
(This used to be commit be742f2481)
2007-10-10 12:19:14 -05:00
Jeremy Allison
bca29ddbba r22122: Start to fix csc issue with Vista. Make smbd support
the extended 7 word response for tconX rather than the
3 word one we supported previously.
Jeremy.
(This used to be commit 137953226a)
2007-10-10 12:19:14 -05:00
Jeremy Allison
bc45c82904 r22096: become_root_uid_only() is unneeded - it's only used in
messages.c. Refactor to use become_root() instead and
make it local to messages.c
Jeremy.
(This used to be commit f3ffb3f984)
2007-10-10 12:19:11 -05:00
Gerald Carter
90dc261315 r22095: BUG 4484: Add more checks to set %a for Vista clients (based on absence of native OS and Lanman strings in the session setup request)
(This used to be commit e5c9fc937d)
2007-10-10 12:19:11 -05:00
Jeremy Allison
97e3cb896f r22065: First logic change I've found :-(. We were being too
restrictive about strings being NULL. If an info level
doesn't use a subformat the subformat string may be
missing (null). Add debug statements to help track
this.
Jeremy
(This used to be commit 70875f92a2)
2007-10-10 12:19:08 -05:00
Jeremy Allison
cab91684e5 r22064: Fix the DFS code to work better with Vista clients. Allow
"host msdfs = true" to be set in the [global] section
and allow Vista to see shares with "msdfs root = yes"
and "msdfs root = no" off the same server. Down
to an error message really :-).
Jeremy.
(This used to be commit 1a0f69bb21)
2007-10-10 12:19:08 -05:00
Jeremy Allison
9b807d4f87 r22060: Fix for AIX quotas from Heinrich Mislik <Heinrich.Mislik@univie.ac.at>.
Jeremy.
(This used to be commit 8d95cdf8c0)
2007-10-10 12:19:07 -05:00
Volker Lendecke
2498a973ac r22059: Over-allocate and NULL out 100 bytes for lanman.c.
Volker
(This used to be commit 0eea6b84ce)
2007-10-10 12:19:06 -05:00
Jeremy Allison
afd637e926 r22050: Fix a couple of off-by-one errors in the rap
call patch. Jerry, this works now for displaying
shares on Win9x (and hopefully everything else
as well :-).
Jeremy.
(This used to be commit 728a4cc713)
2007-10-10 12:19:06 -05:00
Jeremy Allison
0a2cc569a1 r22045: As Volker noticed, skip_string's last argument is
redundent. Remove it.
Jeremy.
(This used to be commit 140881cfbb)
2007-10-10 12:19:05 -05:00
Volker Lendecke
8990b13d2f r22044: Remove the only skip_string(...,2) caller
(This used to be commit 08ea2b83b2)
2007-10-10 12:19:05 -05:00
Volker Lendecke
7371762dae r22043: Comparing lanman.c with -r22013 is now MUCH easier, thanks! This looks much
easier to review! Damn close to what I had in my tree, just the fn names were
slightly different.

This removes one unnecessary dupe.

Next thing is to get rid of the parameter "n" of skip_string, there is only
one (!) caller that does not pass in 1....

Volker
(This used to be commit 2878c1e93a)
2007-10-10 12:19:05 -05:00
Jeremy Allison
e5358d6c55 r22042: Try and clean up my own mess using the API Volker
suggested. I now use :

BOOL is_offset_safe(const char *buf_base, size_t buf_len, char *ptr, size_t off)
char *get_safe_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off)
char *get_safe_str_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off)
int get_safe_SVAL(const char *buf_base, size_t buf_len, char *ptr, size_t off, int failval)
int get_safe_IVAL(const char *buf_base, size_t buf_len, char *ptr, size_t off, int failval)

Volker, please criticize and comment. Thanks,

Jeremy.
(This used to be commit d47af7c926)
2007-10-10 12:19:04 -05:00
Andrew Bartlett
fb3835846e r22020: Make it more clear that both the vuser struct and it's contents are
talloc_free()'ed at the end of a session.

Rework the passwd cache code to use talloc_unlink and
talloc_reference, to more carefully manage the cache.

Andrew Bartlett
(This used to be commit e3e0ec25e6)
2007-10-10 12:19:03 -05:00
Jeremy Allison
730bfd9ced r22017: After changing 2000 lines of this I think this is needed :-).
Jeremy.
(This used to be commit 99092e8841)
2007-10-10 12:19:02 -05:00
Jeremy Allison
261c004d7b r22014: Make us pass RANDOMIPC test again :-(. This is an ugly check-in,
but I've no option.
Jeremy.
(This used to be commit c3a565081d)
2007-10-10 12:19:01 -05:00
Jeremy Allison
b0bcb48369 r22013: Move to SSPI framing (sig first in NTLM).
Jeremy
(This used to be commit 22eaed76f0)
2007-10-10 12:19:01 -05:00
Jeremy Allison
75b4e24067 r22010: Now I'm looking at mangling again, make sure
that we mangle any illegal names before doing
any wildcard matches. That way lies least
suprises. Don't merge this for 3.0.25, too
dangerous. Thanks.
Jeremy.
(This used to be commit 8e15ef476c)
2007-10-10 12:19:01 -05:00
Stefan Metzmacher
bc2b6436d0 r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users

metze
(This used to be commit 3a28443079)
2007-10-10 12:19:00 -05:00
Stefan Metzmacher
b9461058d5 r22008: use string_term_tdb_data()
metze
(This used to be commit 1f047d7e31)
2007-10-10 12:19:00 -05:00
Stefan Metzmacher
56ba447668 r22001: change prototype of dump_data(), so that it takes unsigned char * now,
which matches what samba4 has.

also fix all the callers to prevent compiler warnings

metze
(This used to be commit fa322f0cc9)
2007-10-10 12:18:59 -05:00
Jeremy Allison
e9157961d6 r21997: Implement the server side of gss seal negotiate.
Jeremy.
(This used to be commit 6b923acfee)
2007-10-10 12:18:58 -05:00
Jeremy Allison
4a66d0e232 r21991: I hate Steve French :-). Add support for encryption
contexts....
Jeremy.
(This used to be commit ae8f3649f7)
2007-10-10 12:18:58 -05:00
Stefan Metzmacher
f61062b31d r21980: make use of tdb_*_bystring() and string_term_tdb_data() in smbd/
to avoid creating the TDB_DATA struct from strings "by hand"

metze
(This used to be commit 09b477ed85)
2007-10-10 12:18:55 -05:00
Jeremy Allison
8b63654c2e r21969: Start working on the gss-side of the server negotiation.
Jeremy.
(This used to be commit fbc569b530)
2007-10-10 12:18:54 -05:00
Jeremy Allison
9527f93272 r21961: Repair bug introduced by rev. 21960.
We need to do the initial strtok to set up the internal state.
Jeremy.
(This used to be commit 8c7042b419)
2007-10-10 12:18:53 -05:00
Volker Lendecke
eca13022ef r21960: Fix bugs 4463,4464,4465,4466. Thanks Jason :-)
(This used to be commit a2e27c4431)
2007-10-10 12:18:52 -05:00
Jeremy Allison
b93126ea12 r21953: One format fix, clarify a condition that the IBM
checker was worried about.
Jeremy.
(This used to be commit 70eec7b8ae)
2007-10-10 12:18:52 -05:00
Jeremy Allison
eb46589432 r21952: Fix critical (!) error found by IBM checker.
Missing break statements meant that no info
levels would ever be returned correctly from
POSIX open/mkdir.
Jeremy.
(This used to be commit ae5761ccc6)
2007-10-10 12:18:51 -05:00
James Peach
cc87cb7770 r21950: After discussion with the Apple and Linux client maintainers,
changing the FindFirst response for the UNIX_INFO2 level to include
a length field before the name. The name is not required to be null
terminated. The length field does not count any null.

Also add call to chflags(2) in the default VFS module so that this
will work be default on BSD-derived platform. Add UNIX-INFO2 test
to the build farm to get some non-BSD coverage.

Jeremy and Jerry, please review for inclusion in 3.0.25.
(This used to be commit e7b21b1ef3)
2007-10-10 12:18:51 -05:00
Jeremy Allison
bf26a7632e r21942: Hoist by our own petard :-). Older smbclient binaries
were not able to connect to the rewritten dfs code as
they set the dfs flag bit but then send local paths.

Now that our dfs code is a *lot* more robust in
detecting this sort of braindamage we can just
call into it directly on getting a DFS flag
and let the parser sort it out without having
to check it's actually connecting to a dfs
enabled share (I'm proud of this code :-).

Jeremy.
(This used to be commit 8c4d929c76)
2007-10-10 12:18:51 -05:00
Jeremy Allison
f93d75c932 r21926: Fix missing enum specifier pointed out by Don McCall @ HP.
Thanks Don !
Jeremy.
(This used to be commit 662344d1ec)
2007-10-10 12:18:49 -05:00
Jeremy Allison
23149b3bb8 r21925: Start to code up the gss acquire creds calls.
Jeremy.
(This used to be commit 4a7fbc8852)
2007-10-10 12:18:49 -05:00
Jeremy Allison
42238c78bb r21917: Start to do the gss versions of sign+seal.
Jeremy.
(This used to be commit a226645353)
2007-10-10 12:18:48 -05:00
Volker Lendecke
4a965110e5 r21904: Fix HP build -- thanks, Don
(This used to be commit 57efba97b6)
2007-10-10 12:18:47 -05:00
Jeremy Allison
ea4dada48f r21900: Token exchange now seems to work, now why does the
client encrypt fail ?
Jeremy.
(This used to be commit 6bd7c05290)
2007-10-10 12:18:47 -05:00
Jeremy Allison
a828b56884 r21898: Added test command, fixed first valgrind bugs.
Now to investigate why it doesn't work :-).
Jeremy.
(This used to be commit 73f7c6cef8)
2007-10-10 12:18:47 -05:00
Jeremy Allison
071db6fdbf r21897: Add in a basic raw NTLM encrypt request. Now
for testing.
Jeremy.
(This used to be commit 783a7b3085)
2007-10-10 12:18:46 -05:00
Jeremy Allison
6b0dcfa62d r21894: Some refactoring of server side encryption context. Support
"raw" NTLM auth (no spnego).
Jeremy.
(This used to be commit 6b5ff7bd59)
2007-10-10 12:18:46 -05:00
Jeremy Allison
492ad71855 r21891: Finish server-side NTLM-SPNEGO negotiation support.
Now for the client part, and testing.
Jeremy.
(This used to be commit 487706701f)
2007-10-10 12:18:46 -05:00
Jeremy Allison
296dcbac58 r21882: The server part of the code has to use an AUTH_NTLMSSP struct,
not just an NTLMSSP - grr. This complicates the re-use of
common client and server code but I think I've got it right.
Not turned on of valgrinded yet, but you can see it start
to take shape !
Jeremy.
(This used to be commit 60fc9c0aed)
2007-10-10 12:18:43 -05:00
Volker Lendecke
496dbdf435 r21879: Move process_blocking_lock_queue to a timed event.
The idea is that we have blocking.c:brl_timeout as a timed
event that is present whenever we do have a blocking lock
pending. It fires brl_timeout_fn() which calls
process_blocking_lock_queue().

Whenever we make changes to blocking_lock_queue, we trigger
a recalc_brl_timeout() which sets a new brl_timout event if
necessary. This makes the call to
blocking_locks_timeout_ms() in setup_select_timeout()
unnecessary, this is implicitly done in
event_add_to_select_args() from the timed events.

Volker
(This used to be commit 7e31b8ce21)
2007-10-10 12:18:42 -05:00
Volker Lendecke
fe0b56ead1 r21871: Move deadtime processing into an idle event. While there, simplify
conn_idle_all() a bit.

Volker
(This used to be commit 3fc00977a9)
2007-10-10 12:18:41 -05:00
Volker Lendecke
c0e37a7496 r21870: Move sending auth_server keepalives out of the main loop into an idle event.
Volker
(This used to be commit 6226b30f38)
2007-10-10 12:18:41 -05:00
Volker Lendecke
7c2bc9c070 r21869: Move sending keepalives out of the main processing loop into idle event.
On the way, make lp_keepalive() a proper parameter.

Volker
(This used to be commit 9499fd9c80)
2007-10-10 12:18:41 -05:00
Volker Lendecke
8d0cfddb26 r21868: Remove check_log_size from the central smbd processing loop. This can be done
with a become_root/unbecome_root in debug.c.
(This used to be commit 4632a0caaf)
2007-10-10 12:18:41 -05:00
Volker Lendecke
2864d86b37 r21867: Simplify calling convention of timeout_processing. lp_deadtime is only
referenced in conn_idle_all().
(This used to be commit c0aaee6d36)
2007-10-10 12:18:40 -05:00
Günther Deschner
ab9a46a35c r21858: Fix typo.
Guenther
(This used to be commit 663514e511)
2007-10-10 12:18:39 -05:00
Günther Deschner
8d5f85e004 r21857: Stop pretending to be Vista in the %a macro towards Samba clients.
Guenther
(This used to be commit f55e1a312e)
2007-10-10 12:18:39 -05:00
Jeremy Allison
7d77dd9db6 r21847: Fix memory leaks in error paths (and in main code path in one case...)
in sasl bind. Wonder why coverity didn't find these ?
Jeremy.
(This used to be commit 89bdd30e4b)
2007-10-10 12:18:37 -05:00
Jeremy Allison
edccfc9192 r21845: Refactor the sessionsetupX code a little to allow us
to return a NT_STATUS_TIME_DIFFERENCE_AT_DC error to
a client when there's clock skew. Will help people
debug this. Prepare us for being able to return the
correct sessionsetupX "NT_STATUS_MORE_PROCESSING_REQUIRED"
error with associated krb5 clock skew error to allow
clients to re-sync time with us when we're eventually
able to be a KDC.
Jeremy.
(This used to be commit c426340fc7)
2007-10-10 12:18:37 -05:00
Jeremy Allison
a5dd4355cd r21803: Missed part of patch to make self-referrals work.
Jeremy.
(This used to be commit b1fa55e513)
2007-10-10 12:18:35 -05:00
Volker Lendecke
81c820d77d r21801: Fix Coverity ID # 342
(This used to be commit 8700cd71bb)
2007-10-10 12:18:35 -05:00
Jeremy Allison
24cdd7c733 r21800: Check-in the DFS rewrite. I am still testing this but it
works from smbclient and Windows, and I am promising to
support and fix both client and server code moving forward.
Still need to test the RPC admin support but I haven't
changed that code.
Jeremy.
(This used to be commit 7a7862c01d)
2007-10-10 12:18:34 -05:00
Jeremy Allison
59c071f707 r21792: Fix crash bug triggered by Excel reported by Jerry.
Bad cut-n-paste on rewrite of timestamps.
Jeremy.
(This used to be commit 1809e0866a)
2007-10-10 12:18:34 -05:00
Volker Lendecke
0d91334fe7 r21784: Replace smb_register_idle_event() with event_add_timed(). This fixes winbind
who did not run the idle events to drop ldap connections.

Volker
(This used to be commit af3308ce5a)
2007-10-10 12:18:33 -05:00
Jeremy Allison
5214cb6782 r21783: Add in the "create info" field to the reply
from POSIX_OPEN and POSIX_MKDIR as specified
by Stevef in the wikki (extra 4 byte field).

Also fix horrible bug in James's code (James
you should review this for your Apple patch
tree) where he failed to allocate the correct
return memory size when returning a INFO2
struct. Added #define for the size of the
INFO2 struct and made sure we allocate the
correct size for return.

Jeremy.
(This used to be commit d88bc59cb4)
2007-10-10 12:18:33 -05:00
Jeremy Allison
257d2e0d2a r21777: As Stevef requested and the Apple guys agreed, make
mode_t in posix_open/posix_mkdir -> 8 bytes to match
the SET_UNIX_INFO_BASIC call. Steve is updating the
Wikki.
Jeremy.
(This used to be commit 2f1c95ac77)
2007-10-10 12:18:32 -05:00
Günther Deschner
f6c9f87e05 r21774: Fix the build with Fedora Core 6.
tridge/vl: please check.

Guenther
(This used to be commit 39d54738db)
2007-10-10 12:18:31 -05:00
Jeremy Allison
dd011f453e r21770: For old DOS style searches we must remember if
the initial search had a wildcard in order to
correctly return no error on end of search.
Found by Samba4 torture tester.
Jeremy.
(This used to be commit c74bcf7677)
2007-10-10 12:18:31 -05:00
Jeremy Allison
12c617af08 r21769: Attempt to fix bug #4384 in old search code.
We were accessing a pathname that hadn't gone
through unix_convert ! That's a big no-no...
Jeremy.
(This used to be commit 33a67fd39e)
2007-10-10 12:18:31 -05:00
James Peach
41c8f3da97 r21766: Fix compiler warning.
(This used to be commit f82ac78b2f)
2007-10-10 12:18:29 -05:00
James Peach
872cd741ca r21765: Fix the build for HP-UX.
(This used to be commit 04cb34ff9d)
2007-10-10 12:18:29 -05:00
James Peach
30b9b9acae r21763: Add support for the UNIX_INFO2 infolevel.
(This used to be commit 262e4e1fd8)
2007-10-10 12:18:29 -05:00
Jeremy Allison
db32963181 r21759: Fix the same bug in a more elegant way, strrchr_m
is an expensive call....
Jeremy.
(This used to be commit 321a136dbc)
2007-10-10 12:18:28 -05:00
Jeremy Allison
c4ea95fd30 r21758: Fix a very specific dfs bug when passing in POSIX
pathnames. When we're working out how much we've
consumed we need to backtrack by either a '/' or '\\'
component, as both are valid separators.
Jeremy.
(This used to be commit 1722ea20db)
2007-10-10 12:18:28 -05:00
Jeremy Allison
286d8554aa r21756: An invarient the dfs code depended on for POSIX paths
is no longer true, so fix it.
Jeremy.
(This used to be commit 698159c0ee)
2007-10-10 12:18:28 -05:00
Jeremy Allison
7b2c2e4155 r21754: Volker is completely correct. There's no need for
the RESOLVE_DFSPATH macros and their varients
any more. Fix reporting profile bug with all
error returns.
Jeremy.
(This used to be commit cdf0fdb104)
2007-10-10 12:18:28 -05:00
Volker Lendecke
062a22be47 r21748: More cosmetic alignment. One change to call_nt_transact_create(): We were
asking open_file_ntcreate for a batch oplock if the client asked us to do so,
even if it did not ask for an oplock in the first place. Did not test it, but
I think this is bogus anyway.

Volker
(This used to be commit 0b94af112b)
2007-10-10 12:18:27 -05:00
Volker Lendecke
5309fd6d13 r21747: Cosmetic checkin to bring ntcreate and nttranscreate closer together
(This used to be commit ecc781f1a2)
2007-10-10 12:18:27 -05:00
Jeremy Allison
235b0f97f2 r21731: Fix long-standing bug in our chain processing code.
Should fix a bug with WinPE. Probably a candidate
for the Vista patchset.
Jeremy.
(This used to be commit ef32de6b59)
2007-10-10 12:18:26 -05:00
James Peach
ba992d5ad7 r21717: Support the SMB_QUERY_POSIX_WHOAMI info level on QueryFsInfo.
(This used to be commit 32c7281f90)
2007-10-10 12:18:25 -05:00
Jeremy Allison
4952fe368a r21714: Change the VFS interface to use struct timespec
for utimes - change the call to ntimes. This preserves
nsec timestamps we get from stat (if the system supports
it) and only maps back down to usec or sec resolution
on time set. Looks bigger than it is as I had to move
lots of internal code from using time_t and struct utimebuf
to struct timespec.
Jeremy.
(This used to be commit 8f3d530c5a)
2007-10-10 12:18:24 -05:00
Jeremy Allison
10ab7a3a78 r21672: The cannonical file access pattern should look like this :
srvstr_get_path(inbuf, name, smb_buf(inbuf) + 1, sizeof(name), 0, STR_TERMINATE, &status);
	if (!NT_STATUS_IS_OK(status)) {
		return ERROR_NT(status);
	}

	RESOLVE_DFSPATH(name, conn, inbuf, outbuf);

	status = unix_convert(conn, name, False, NULL, &sbuf);
	if (!NT_STATUS_IS_OK(status)) {
		return ERROR_NT(status);
	}

	status = check_name(conn, name);
	if (!NT_STATUS_IS_OK(status)) {
		return ERROR_NT(status);
	}

Make sure that every access pattern (including the
wildcard generated paths from unlink, rename, and copy)
do the same. Tidy things up a bit....

Jeremy.
(This used to be commit b8327b21dd)
2007-10-10 12:18:23 -05:00
Jeremy Allison
9b0f22d065 r21667: posix_unlink should break existing oplocks.
Jeremy.
(This used to be commit 8a90d5dd4f)
2007-10-10 12:18:23 -05:00
Jeremy Allison
1f56aabf90 r21665: Fix bug #4428 reported by Jason Mader <jason@ncac.gwu.edu>.
Jeremy.
(This used to be commit fe00771df5)
2007-10-10 12:18:23 -05:00
Jeremy Allison
059e4cfa03 r21645: Make posix_unlink work - on open files too !
Jeremy.
(This used to be commit 98f4b64574)
2007-10-10 12:18:21 -05:00
Jeremy Allison
ea3e890130 r21644: Allow mkdir on platforms with no O_DIRECTORY.
Add proper debug to all possible setfilepathinfo
functions.
Jeremy.
(This used to be commit 3c47a5ef25)
2007-10-10 12:18:21 -05:00
Jeremy Allison
81cce13321 r21638: Change POSIX_UNLINK to allow clients to differentiate
between unlink/rmdir calls.
Jeremy.
(This used to be commit f0c8488d38)
2007-10-10 12:18:19 -05:00
Jeremy Allison
62a6f8940d r21603: Horrible backwards compatibility hack as an old server bug
allowed a CIFS client bug to remain unnoticed :-(.
I suck.
Jeremy.
(This used to be commit 29761173ee)
2007-10-10 12:18:15 -05:00
Volker Lendecke
28e2069d1f r21547: Fix from Michael Adam <ma@sernet.de>: Refuse registry shares without path.
Thanks,

Volker
(This used to be commit e795865d58)
2007-10-10 12:18:11 -05:00
Jeremy Allison
ca229b0980 r21483: Fix use of uninitialized variable.
Jeremy.
(This used to be commit 4a74d042c9)
2007-10-10 12:18:08 -05:00
Jeremy Allison
2afcdc8732 r21482: Use IPC$ not ipc$ for consistency.
Jeremy.
(This used to be commit 42a846b3df)
2007-10-10 12:18:07 -05:00
Jeremy Allison
01ecda0534 r21481: No one said anything, so I'm disallowing anything
but explicit shares in "default service" :-).
Jeremy.
(This used to be commit 90bdcce765)
2007-10-10 12:18:07 -05:00
Jeremy Allison
a9dbdf937c r21480: Make fd_open match fd_close be translating
errno into an NTSTATUS immediately.
Jeremy.
(This used to be commit 71dd02cc16)
2007-10-10 12:18:07 -05:00
Jeremy Allison
cedcf06b22 r21478: Add 65k length limit for split SPNEGO blobs.
Jeremy
(This used to be commit 6be078da26)
2007-10-10 12:18:07 -05:00
Alexander Bokovoy
4156129490 r21467: Add GPFS-provided DMAPI support based on their GPL library
(This used to be commit 5876bedda5)
2007-10-10 12:18:06 -05:00
Volker Lendecke
b45442e46d r21461: Not strictly necessary, as data_blob() panics if it can't allocate. But I'd
see this as a design flaw in data_blob() and it made me look in that routine.

Jeremy, revert or merge please :-)

Volker
(This used to be commit e7e6b8b5e0)
2007-10-10 12:18:06 -05:00
Jeremy Allison
f77bdcf6c7 r21460: Fix for server-side processing of SPNEGO auth
fragmented into "max xmit" size security blob
chunks. Bug #4400. Needs limits adding, and also
a client-side version.
Jeremy.
(This used to be commit aa69f2481a)
2007-10-10 12:18:06 -05:00
Volker Lendecke
bca83e3b08 r21409: saved_status1 is not used anymore after aio write behind was removed
(This used to be commit 29a1892c13)
2007-10-10 12:18:02 -05:00
Volker Lendecke
3057c3975c r21379: Attempt to fix the build on "gwen"
(This used to be commit 3d85eb758d)
2007-10-10 12:17:59 -05:00
Simo Sorce
29b6971da7 r21369: sys_disk_free return type is SMB_BIG_UINT.
Fix dfree_retval to be SMB_BIG_UINT as well,
otherwise we may wrap up on > 2T file systems.

Simo.
(This used to be commit 0bb7f6492c)
2007-10-10 12:17:59 -05:00
Jim McDonough
5a052edf03 r21324: Add linux setlease to the vfs layer. Next round, as Volker points out,
it should be abstracted a little higher up so other os'es can have an
entry, but it will take a bit more work.  Thanks to Chetan Shringarpure
and Mathias Dietz.

I didn't increment the vfs number again because the kernel change notify
stuff hasn't been released yet anyway.
(This used to be commit 9463211bf3)
2007-10-10 12:17:56 -05:00
Volker Lendecke
a2f2653d9a r21319: Remove functions not needed anymore
(This used to be commit 0c8a364aec)
2007-10-10 12:17:56 -05:00
Volker Lendecke
8a96fe6a59 r21280: Fix an uninitialized variable warning. Jeremy, please check.
Volker
(This used to be commit 4faa37a515)
2007-10-10 12:17:54 -05:00
Volker Lendecke
d9a29aade0 r21279: Get rid of 'aio write behind', this is broken.
It should probably better be integrated with our write cache.

Volker
(This used to be commit 58bfd168b0)
2007-10-10 12:17:53 -05:00
Volker Lendecke
fe881c3e38 r21278: The main goal of this was to get rid of the NetInBuffer / set_InBuffer. But it
turns out that this patch actually speeds up the async writes considerably.

I tested writing 100.000 times 65535 bytes with the allowed 10 ops in
parallel. Without this patch it took about 32 seconds on my dual-core 1.6GHz
laptop. With this patch it dropped to about 26 seconds. I can only explain it
by better cache locality, NewInBuffer allocates more than 128k, so we jump
around in memory more.

Jeremy, please check!

Volker
(This used to be commit 452d51bc6f)
2007-10-10 12:17:53 -05:00
Volker Lendecke
4f5cfc9899 r21277: Fix an off by one error in the signal handler for aio: We can actually receive
AIO_PENDING_SIZE signals, not one less.

Jeremy I'm not merging this to 3_0_25, I want you to look at it first!

Volker
(This used to be commit 8fd0ec5836)
2007-10-10 12:17:53 -05:00
Jeremy Allison
985a26118a r21274: As we now have POSIX opens which can unlink
with other open files we may have taken
the delete code path with more than one share mode
entry - ensure we only delete once by resetting
the delete on close flag.
Jeremy.
(This used to be commit 429dff3166)
2007-10-10 12:17:53 -05:00
Volker Lendecke
bea1025b1a r21269: Reformatting
(This used to be commit b2eaa733c5)
2007-10-10 12:17:53 -05:00
Jeremy Allison
86e5659aba r21257: Better fix for bug #4188 :
Windows Vista RC1 and RC2 can't delete directory on Samba share
based on work by Joe Meadows <jmeadows@webopolis.com>.
Jeremy.
(This used to be commit 2dab892876)
2007-10-10 12:17:51 -05:00
Volker Lendecke
5920d870cf r21251: Okay, after Jeremy has kindly tested this, check it in :-)
Attached find a workaround that works for me. This is not the "correct" fix,
to me it seems our DFS referral marshalling is broken. Vista requests level 4,
we reply with level 2, and Vista seems not to like that. If we reply with
level 3 it seems more happy.

Needs more work!

Volker
(This used to be commit 4c3a913562)
2007-10-10 12:17:51 -05:00
Gerald Carter
7db1c6873c r21250: Partial fix for BUG 4093: Make %a expand to "Vista"
based on the flags2 values in the negprot request.

This also includes some code for testing the dialect
strings for "SMB 2.001" but this is unreliable as Vista
only sends that in the 1st negprot and caches the fact
that we don't support it.  Restartnig the WOrkstation
service on the client clears the cache.
(This used to be commit d781eeb0e4)
2007-10-10 12:17:51 -05:00
Jeremy Allison
92715eaf0b r21247: In the refactoring I dropped a RESOLVE_DFSPATH call
from setpathinfo. Return it and make sure all paths
go through a dfs resolve.
Jeremy.
(This used to be commit 7fd3a146c1)
2007-10-10 12:17:51 -05:00
Jeremy Allison
e4bcfcf1c5 r21246: Remove incorrect control on unix set info.
We can take path or handle based calls.
Jeremy.
(This used to be commit a19fe0f0c4)
2007-10-10 12:17:51 -05:00
Jeremy Allison
b32efe921f r21229: Don't indirect through a potentially null pointer :-).
Jeremy.
(This used to be commit 6723f9d85c)
2007-10-10 12:17:49 -05:00
Jeremy Allison
778f3a00f0 r21227: Quick fix for Stevef - ensure the returned data on open
is 8 byte aligned.
Jeremy.
(This used to be commit 7645044fcf)
2007-10-10 12:17:49 -05:00
Jeremy Allison
ffe646b1e6 r21226: Fix bug #4377 (rename of "foo" -> "Foo" fails).
This is actually an interesting case as it exposed bad code in our DFS redirect
module (that was where the bug was introduced).
Caused by our turning on dfsroot be default.
Jeremy.
(This used to be commit 5fe25588f5)
2007-10-10 12:17:49 -05:00
Jeremy Allison
4901d7f10b r21225: Couple of fixes from Martin Zielinski mz@seh.de,
one typo, one to make sure that time initialization
is done before modules that depend on it (printer
initialization).
Jeremy.
(This used to be commit 6df32b4a6a)
2007-10-10 12:17:48 -05:00
Jeremy Allison
255177d2b9 r21223: Try and fix bug #4361 - Vista backup fails.
Based on work from  Joe Meadows <jameadows@webopolis.com>.
One for the Vista patchset.
Jeremy.
(This used to be commit 470a4dc308)
2007-10-10 12:17:48 -05:00
Jeremy Allison
995a916481 r21210: Fix POSIX open to return an info level.
Jeremy.
(This used to be commit 5fa720f04f)
2007-10-10 12:17:47 -05:00
Jeremy Allison
f3f1dd8879 r21207: Make the code match the spec :-).
Jeremy.
(This used to be commit 36afae2d48)
2007-10-10 12:17:47 -05:00
Jeremy Allison
7a5fa7f12e r21191: Add in the POSIX open/mkdir/unlink calls.
Move more error code returns to NTSTATUS.
Client test code to follow... See if this
passes the build-farm before I add it into
3.0.25.
Jeremy.
(This used to be commit 83dbbdff34)
2007-10-10 12:17:47 -05:00
Volker Lendecke
c59a49d83b r21184: Dummy checkin to let the build farm pick up r21183 of Samba4
(This used to be commit 22c9511314)
2007-10-10 12:17:46 -05:00
Volker Lendecke
6ab97dc69d r21181: Add some debug, fix the NT_STATUS_IO_TIMEOUT problems in the RAW-NOTIFY test
in the build farm.

Volker
(This used to be commit 3dd1bf667f)
2007-10-10 12:17:46 -05:00
Jeremy Allison
14785319cc r21166: Ensure we return the correct "EROFS" error on a non-writable
filesystem.
Jeremy.
(This used to be commit 1e25501e8e)
2007-10-10 12:17:45 -05:00
Volker Lendecke
43101d6dd5 r21131: Some notify fixes
(This used to be commit b9300e1d5a)
2007-10-10 12:17:41 -05:00
Jeremy Allison
685ca94ac2 r21128: Fix Vista connecting to Samba in share level security.
Vista sends the NTLMv2 blob by default in the tconX
packet. Make sure we save off the workgroup the user
was logged into on the client in the sessionsetupX
and re-use it for the NTLMv2 calc.
Jeremy.
(This used to be commit 45dcf62960)
2007-10-10 12:17:41 -05:00
Volker Lendecke
0d0e322d4d r21123: Make notify_fsp() static to notify.c.
Volker
(This used to be commit d663b729c0)
2007-10-10 12:17:41 -05:00
Volker Lendecke
fd0f2e20ee r21121: Fix error message, based on RAW-NOTIFY
(This used to be commit 2d0a0a0b34)
2007-10-10 12:17:40 -05:00
Volker Lendecke
f4c3d1543d r21120: Make notify a bit more robust: Delete the notify records if we figured out
that the process holding it is not around anymore.

Tridge, please review this and possibly also include it in 4. We can discuss
the error message for "unknown target" from messaging_send, INVALID_HANDLE
seemed to be most appropriate to me.

Volker
(This used to be commit 3b3ed7429e)
2007-10-10 12:17:40 -05:00
Volker Lendecke
69d8c5ae5f r21115: notify_internal.c needs to remove the table entry if a process has crashed. So
it needs the specific error message.

Make messages.c return NTSTATUS and specificially NT_STATUS_INVALID_HANDLE if
sending to a non-existent process.

Volker
(This used to be commit 3f620d181d)
2007-10-10 12:17:39 -05:00
Volker Lendecke
bad8c39f1c r21111: Reorganize the change notify params a bit. We now have the per-share
parameters

change notify = [yes]/no           # do we do it at all
kernel change notify = [yes]/no    # enable/disable inotify

Those who want FAM need to say

change notify = yes
vfs objects = notify_fam

Volker
(This used to be commit c3a44d8b96)
2007-10-10 12:17:39 -05:00
Volker Lendecke
6b8fc040e5 r21109: Send notify_fam.c through the VFS. Lets see how the build farm likes this.
Volker
(This used to be commit e57a6d4d63)
2007-10-10 12:17:38 -05:00
Volker Lendecke
240a3fd644 r21108: Send sys_notify_watch through the VFS, FAM is next
(This used to be commit 603a967613)
2007-10-10 12:17:38 -05:00
Volker Lendecke
8b7233f19b r21107: Adapt notify_fam.c to the new infrastructure. This works in my test, but does
not survive the raw-notify test just because famd is too slow. Events are
coming in too late and are thus unsyncronized.

Now to get that through the VFS.

Volker
(This used to be commit c84bf6c4f9)
2007-10-10 12:17:38 -05:00
Volker Lendecke
6b5c848e91 r21104: Rename struct watch_context to struct inotify_watch_context
(This used to be commit 7ac79203f2)
2007-10-10 12:17:37 -05:00
Jeremy Allison
4e1a6ca710 r21097: Ensure that when manipulating UNIX permissions via
the UNIX extensions we use the correct mask/force mask
settings for new and existing files/directories. Bug
reported by Juran David <ext-david.juran@nokia.com>.
Jeremy.
(This used to be commit d84af53666)
2007-10-10 12:17:36 -05:00
Volker Lendecke
9974656d3b r21093: Remove the hash and dnotify backends. Disabling FAM for this checkin, I'm
working on that right now.

Volker
(This used to be commit 01c9fb1728)
2007-10-10 12:17:36 -05:00
Volker Lendecke
2852ecc67e r21092: Ok, that's the one that activates the Samba4 notify backend.
Now to clean up / fix lots of stuff.

Volker
(This used to be commit 9e7443fa14)
2007-10-10 12:17:36 -05:00
Volker Lendecke
accbfaa4c3 r21091: Fix the build without inotify
(This used to be commit 686345b7ed)
2007-10-10 12:17:36 -05:00
Volker Lendecke
3af5838096 r21090: Add some helper routines
(This used to be commit 985dde8ed0)
2007-10-10 12:17:35 -05:00
Volker Lendecke
697ccab3f0 r21089: Do notifies on rename
(This used to be commit 2aadb95a7e)
2007-10-10 12:17:35 -05:00
Volker Lendecke
547f77778a r21087: Make the param list of notify_fname match notify_trigger
(This used to be commit defa28f9c3)
2007-10-10 12:17:34 -05:00
Volker Lendecke
113e21f0a5 r21084: Make the Samba4 files compile in Samba3, not activated yet.
Volker
(This used to be commit c24854433a)
2007-10-10 12:17:34 -05:00
Volker Lendecke
b9af964680 r21083: Actually make it static... :-)
(This used to be commit 65f473d22b)
2007-10-10 12:17:34 -05:00
Volker Lendecke
37a3339a18 r21082: Make canonicalize_path static to service.c -- we do have conn->connectpath
(This used to be commit 06f58096e3)
2007-10-10 12:17:34 -05:00
Volker Lendecke
434bf5fadd r21080: Reformatting
(This used to be commit 705f866a78)
2007-10-10 12:17:34 -05:00
Volker Lendecke
b0bf3ddb38 r21079: Minimizing diff: Adopt the Samba4 style ChangeNotify flags.
Volker
(This used to be commit a3c1069b0c)
2007-10-10 12:17:33 -05:00
Volker Lendecke
9ee97d2f7d r21077: A step to minimize the diff later: This pulls in unmodified files from Samba4,
not compiled yet. This way the modifications become visible later.

ntvfs/common/notify.c -> smbd/notify_internal.c
ntvfs/sysdep/inotify.c -> smbd/notify_inotify.c

Naturally I had to disable notify again :-)

Volker
(This used to be commit cdb7d582b7)
2007-10-10 12:17:33 -05:00
Volker Lendecke
05f298b47e r21073: Fix compiler warning
(This used to be commit 3977ee027f)
2007-10-10 12:17:33 -05:00
Jeremy Allison
44da8a6907 r21067: Finished refactoring setqpathinfo to be readable
and modifiable by other people. Now to look over
the build farm and fix any breakage.
Jeremy.
(This used to be commit 997259f247)
2007-10-10 12:17:32 -05:00
Volker Lendecke
caf8c6a76b r21064: The core of this patch is
void message_register(int msg_type,
                      void (*fn)(int msg_type, struct process_id pid,
-                                void *buf, size_t len))
+                                void *buf, size_t len,
+                                void *private_data),
+                     void *private_data)
 {
        struct dispatch_fns *dfn;

So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.

Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.

Volker
(This used to be commit c8ae60ed65)
2007-10-10 12:17:32 -05:00
Jeremy Allison
cb916d33f5 r21063: All case statements are now NTSTATUS returning
functions. Now to factor out the post processing
and make all cases behave the same (no mixture
of "early returns" and "break"s.
Jeremy
(This used to be commit 7e17e54cb7)
2007-10-10 12:17:32 -05:00
Jeremy Allison
deaf4131b9 r21062: Should fix the build plus make all refactored
functions return NTSTATUS.
Jeremy.
(This used to be commit 1f3c2b2abc)
2007-10-10 12:17:31 -05:00
Jeremy Allison
e5be27a308 r21061: Refactoring all the cases into NTSTATUS returns.
Jeremy.
(This used to be commit da4ce69d40)
2007-10-10 12:17:31 -05:00
Jeremy Allison
5c9344fa4c r21060: Start refactoring out the non-return case statements
into functions.
Jeremy.
(This used to be commit 461db3c8ed)
2007-10-10 12:17:31 -05:00
Jeremy Allison
a4e3c20deb r21058: Finish the easy refactoring - split out all the case
statements that do early return. Next will be case
statements that need post processing, finally on to
qfilepathinfo and do the same.
Jeremy.
(This used to be commit c961d5ce94)
2007-10-10 12:17:31 -05:00
Jeremy Allison
845647f468 r21057: More refactoring into functions.
Jeremy.
(This used to be commit fe2d7cb2dc)
2007-10-10 12:17:31 -05:00
Jeremy Allison
e90b6c743d r21054: More function refactoring.
Jeremy.
(This used to be commit b6f43e9509)
2007-10-10 12:17:30 -05:00
Jeremy Allison
54aefc2267 r21053: More refactoring and fix the tests (set position info
on a pathname is ignored).
Jeremy.
(This used to be commit 3c7a876c90)
2007-10-10 12:17:30 -05:00
Jeremy Allison
1e55fdb7b7 r21052: Refactoring.
Jeremy.
(This used to be commit 9e31d7dba3)
2007-10-10 12:17:30 -05:00
Jeremy Allison
c219ebd7e8 r21051: More function refactoring... Added #if 0 for
questionable practice (ignoring bad fsp on
handle based call).
Jeremy.
(This used to be commit 5a8c9286c3)
2007-10-10 12:17:30 -05:00
Jeremy Allison
7c5221a777 r21050: Factor out SMB_SET_FILE_DISPOSITION_INFO. My
intent is to factor out all cases where we
always return from the case.
Jeremy.
(This used to be commit 3eca52ba43)
2007-10-10 12:17:29 -05:00
Jeremy Allison
1e753db3d4 r21049: Start to refactor some of the setpath set code
into separate functions (tridge mailed me a fresh
batch) to make it easier to add the POSIX open we'll
need soon.
Jeremy.
(This used to be commit 63bd8759fe)
2007-10-10 12:17:29 -05:00
Jeremy Allison
3bd12f9658 r21035: Remove unneeded checks on incoming uid/gid for
mknod (fifo) unix extensions code. Problem
discovered by Anders Karlsson <anders.karlsson@redhat.com>.
Jeremy.
(This used to be commit ec6033ad7c)
2007-10-10 12:17:28 -05:00
Herb Lewis
109bebe1f8 r21002: Get rid of unused macros - merge change from 3_0_24
(This used to be commit 9d23cf0cc4)
2007-10-10 12:17:25 -05:00
Volker Lendecke
db8ee51cf2 r20982: Fix a segfault -- I wonder why my make test did not show this earlier...
(This used to be commit 4984b0627c)
2007-10-10 12:17:22 -05:00
James Peach
23e227ac39 r20966: Only attempt to reload the config file atfer the fork point if we
are in daemon mode. If we are in inetd mode, there's really no point
in rechecking it so soon.
(This used to be commit 029d4bb5e3)
2007-10-10 12:17:22 -05:00
Volker Lendecke
0de21e9515 r20933: Fix the build without inotify
(This used to be commit 4587d80972)
2007-10-10 12:17:21 -05:00
Volker Lendecke
420e577004 r20932: This is the basic infrastructure for inotify support. This is far from being
complete, in particular the various mask bits are not correctly supported
yet. Checkin in now, I want to see how the build farm likes it.

Volker
(This used to be commit c9a5d011a9)
2007-10-10 12:17:21 -05:00
Volker Lendecke
d5206610cd r20931: This changes the notify infrastructure from a polling-based to an event-driven
based approach. The only remaining hook into the backend is now

	void *(*notify_add)(TALLOC_CTX *mem_ctx,
			    struct event_context *event_ctx,
			    files_struct *fsp, uint32 *filter);

(Should we put this through the VFS, so that others can more easily plug in?)

The trick here is that the backend can pick filter bits that the main smbd
should not handle anymore. Thanks to tridge for this idea.

The backend can notify the main smbd process via

void notify_fsp(files_struct *fsp, uint32 action, char *name);

The core patch is not big, what makes this more than 1800 lines are the
individual backends that are considerably changed but can be reviewed
one by one.

Based on this I'll continue with inotify now.

Volker
(This used to be commit 9cd6a8a827)
2007-10-10 12:17:21 -05:00
Jeremy Allison
aacd16e7c4 r20916: Add in the delete on close final fix - but only enabled
with -DDEVELOPER.
Jeremy.
(This used to be commit 7f817067a7)
2007-10-10 12:17:19 -05:00
Jeremy Allison
c9a14ea19f r20883: W00t! I now understand how "delete on close" really
works - even with the strange "initial delete on close"
semantics. The "initial delete on close" flag isn't
committed to the share mode db until the handle is
closed, and is discarded if any real "delete on close"
was set. This allows me to remove the "initial_delete_on_close"
flag from the share db, and move it into a BOOL in files_struct.
Warning ! You must do a make clean after this. Cope with
the wrinkle in directory delete on close which is done
differently from files. We now pass all Samba4 smbtortute
BASE-DELETE tests except for the one checking that files
can't be created in a directory which has the delete on
close set (possibly expensive to fix).
Jeremy.
(This used to be commit f2df77a149)
2007-10-10 12:17:18 -05:00
Volker Lendecke
00deaa584c r20878: Fix build with --enable-profiling
(This used to be commit eb14d0ea83)
2007-10-10 12:17:17 -05:00
Volker Lendecke
2958f46733 r20877: Random notify fixes
(This used to be commit 2f1bfc5373)
2007-10-10 12:17:17 -05:00
Jeremy Allison
fd37f98158 r20873: Some correctness fixes w.r.t. Samba4 torture BASE-DELETE.
Allow us to correctly refuse to set delete on close on a
non-empty directory. There are still some delete-on-close
wrinkles to be fixed, but I understand how to do that better
now. I'll fix this tomorrow.
Jeremy.
(This used to be commit 0296358858)
2007-10-10 12:17:16 -05:00
Volker Lendecke
ab41ff67f1 r20858: change_notify_reply_packet is static
(This used to be commit a1d0644d15)
2007-10-10 12:17:14 -05:00
Volker Lendecke
90f59d4412 r20856: Make "struct notify_mid_map" private to notify.c
(This used to be commit beecef0c70)
2007-10-10 12:17:14 -05:00
Volker Lendecke
940192ddcc r20854: Ok, now I think we're at a point where looking at notify starts to make sense
again :-)

Volker
(This used to be commit 5533cdeec1)
2007-10-10 12:17:13 -05:00
Volker Lendecke
bf219447a3 r20846: Before this gets out of control...
This add a struct event_context and infrastructure for fd events to smbd. This
is step zero to import lib/events.

Jeremy, I rely on you to watch the change in receive_message_or_smb()
closely. For the normal code path this should be the only relevant change. The
rest is either not yet used or is cosmetic.

Volker
(This used to be commit cd07f93a8a)
2007-10-10 12:17:13 -05:00
Jeremy Allison
60c1a8e5a8 r20845: Somehow I missed this one - should have been part of the
previous commit :-(.
Jeremy.
(This used to be commit 8fe3829e8a)
2007-10-10 12:17:13 -05:00
Jeremy Allison
83eb0d1d6d r20844: Somewhat radical change - this may break the build (I will
watch carefully - so I'm doing it in one transaction so I can
roll back).

Change check_name(), reduce_name() and dptr_create() to
return NTSTATUS. This helps a lot in error path processing
and especially in reduce_name() allows us to ditch the flaky
and error-prone saving of errno and return errors directly.

Jeremy.
(This used to be commit 6133a694aa)
2007-10-10 12:17:12 -05:00
Jeremy Allison
52a36db39f r20843: Get rid of last BOOL ok.
Jeremy.
(This used to be commit a36d446fb6)
2007-10-10 12:17:12 -05:00
Jeremy Allison
f065b42dcc r20842: Only one more BOOL ok to go...
Jeremy.
(This used to be commit de0bf477da)
2007-10-10 12:17:12 -05:00