1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-30 13:18:05 +03:00
Commit Graph

2151 Commits

Author SHA1 Message Date
Tim Potter
bb3bf8d3f4 Merge of increment_smbd_process_count() fix from appliance.
(This used to be commit c39c54e6b6)
2003-01-24 04:04:49 +00:00
Tim Potter
644d31ae25 Merge of max log file fixes from appliance:
- smbd/process.c: check log file sizes more often than in
       timeout_processing()

 - lib/debug.c: increment debug_count inside Debug1() instead of
       when log file sizes are checked.
(This used to be commit 303710c206)
2003-01-23 03:02:08 +00:00
Jeremy Allison
074c99a852 Fix reference count bug where smbd's would not terminate with no
open resources.
Jeremy.
(This used to be commit 0173d6fe16)
2003-01-17 06:35:33 +00:00
Tim Potter
f1ffe1b1dc Remove unused variable in reply_spnego_ntlmssp_ok
(This used to be commit 60c13a7675)
2003-01-17 01:08:09 +00:00
Andrew Bartlett
d92b21280e Updates to the NTLMSSP code again - moving the base64 decode fuctionality out
of the SWAT code, and adding a base64 encoder.

The main purpose of this patch is to add NTLMSSP support to 'ntlm_auth', for
use with Squid.  Unfortunetly the squid side doesn't quite support what we need
yet.

Changes to winbind to get us the info we need, and a couple of consequential
changes/cleanups in the rest of the code.

Andrew Bartlett
(This used to be commit fe50ca8f54)
2003-01-16 03:29:54 +00:00
Tim Potter
9184bf744b Removed level 0 DEBUG leftover from testing.
(This used to be commit 7ed8046d04)
2003-01-15 22:15:07 +00:00
Gerald Carter
5fb5950258 small merges from SAMBA_3_0; mostly typos, renames, etc...
(This used to be commit 9ac196dad4)
2003-01-15 18:31:46 +00:00
Andrew Bartlett
58fe4d9c20 Refactor the NTLMSSP code again - this time we use function pointers to
eliminate the dependency on the auth subsystem.  The next step is to add
the required code to 'ntlm_auth', for export to Squid etc.

Andrew Bartlett
(This used to be commit 9e48ab86da)
2003-01-15 12:52:38 +00:00
Gerald Carter
74d4198a9c [merge] removing unused variable and unused file
(This used to be commit 099e844571)
2003-01-14 23:55:14 +00:00
Gerald Carter
05edd278c2 make -i flag work lik eit did in 2.2
(This used to be commit 54b054c1ed)
2003-01-14 15:52:45 +00:00
Andrew Tridgell
6d030555a1 query_alt_name takes a forced unicode string in win2000. It is not
null terminated.

Thanks to Metze for finding this.
(This used to be commit e4ce26332b)
2003-01-14 02:51:37 +00:00
Andrew Bartlett
e3293c7181 Updates to our NTLMSSP code:
This tries to extract our server-side code out of sessetup.c, and into a more
general lib.  I hope this is only a temporay resting place - I indend to
refactor it again into an auth-subsystem independent lib, using callbacks.

Move some of our our NTLMSSP #defines into a new file, and add two that I found
in the COMsource docs - we seem to have a double-up, but I've verified from
traces that the NTLMSSP_TARGET_TYPE_{DOMAIN,SERVER} is real.

This code also copes with ASCII clients - not that we will ever see any here,
but I hope to use this for HTTP, were we can get them.  Win2k authenticates
fine under forced ASCII, btw.

Tested with Win2k, NTLMv2 and Samba's smbclient.

Andrew Bartlett
(This used to be commit b6641badcb)
2003-01-13 12:48:37 +00:00
Andrew Bartlett
9742f673fd Ensure we do not pass uninitialised data to the kernel. (Picked up by
valgrind).

Andrew Bartlett
(This used to be commit f8d9880c5f)
2003-01-13 08:09:32 +00:00
Andrew Bartlett
e009abb20a Oops, this is the change to use an fstring for the incoming service buffer -
the commit to reply.c just matches a pstrcpy for the pstring.  (harmless, fixes
it for the automated test).

Andrew Bartlett
(This used to be commit ef9c7586ac)
2003-01-12 11:31:03 +00:00
Andrew Bartlett
ebb60c0302 Make the 'service' in make_connection() use an fstrcpy(), and an fstring,
becouse that is what it's input (reply_tcon_and_x) uses, and becouse we really
don't want supprises for service names.

Also remove a legacy #define, in favor of the lp_ equiv.

Andrew Bartlett
(This used to be commit 7854a439ac)
2003-01-12 11:29:02 +00:00
Andrew Bartlett
1a6e78fda3 Remove an unused paramter for our old LM-only password change code, and fix a
(harmless) fstring/pstring mixup.

Andrew Bartlett
(This used to be commit 5ff5f540cc)
2003-01-11 12:13:03 +00:00
Andrew Bartlett
674c750df7 No point having this for both parts of the 'if' statement.
Andrew Bartlett
(This used to be commit 3b2e5f68cd)
2003-01-11 03:23:16 +00:00
Gerald Carter
47873e781d [merge] make sure to updatre print queue cache during timeout_processing() to send notify events; CR 1491
(This used to be commit 142c5029c7)
2003-01-11 02:29:23 +00:00
Tim Potter
c4b4386996 Remove read_with_timeout() and replaced its only caller (the passwd chat
stuff) with a call to read_socket_with_timeout() which does the same thing.

Passwd chat still works but I couldn't figure out the right arguments to
passwd chat to get it to work right but data was definitely getting
through.
(This used to be commit 88eb9e9486)
2003-01-09 06:58:07 +00:00
Tim Potter
642fad95ef Moved smbd process counting functions from smbd/server.c to smbd/process.c
so that bin/vfstest can link.
(This used to be commit 812ce0368c)
2003-01-09 05:49:51 +00:00
Jeremy Allison
619fcbdb68 Ensure we return disk full by default on short writes.
Jeremy.
(This used to be commit 6a2b7fd82c)
2003-01-08 23:49:37 +00:00
Jeremy Allison
65195b4d54 Ensure we don't get an invalid number for total smbd's if the tdb update
fails.
Jeremy.
(This used to be commit 99e69fd74d)
2003-01-08 21:42:43 +00:00
Jeremy Allison
8df73edd8e Fix erroneous free of SAM_ACCOUNT (make clearer when allocated
memory is being returned).
Jeremy
(This used to be commit b0d547b739)
2003-01-08 07:02:18 +00:00
Jeremy Allison
f420f75508 Fix open problem with changing attributes on an existing file - based
on work by  <steve@griffin.sio2.nl>.
Jeremy.
(This used to be commit 465d86d95f)
2003-01-08 02:09:14 +00:00
Tim Potter
33e019a0c5 Remove unused variable.
(This used to be commit 4bc82624f6)
2003-01-07 03:31:52 +00:00
Jeremy Allison
be0ff9d809 Fix memory leaks in pdb_ code.
Jeremy.
(This used to be commit ddf741c717)
2003-01-06 21:48:43 +00:00
Andrew Bartlett
cfe7718e9a Fix a segfault when we don't correctly load a VFS module (don't keep it in
the loaded list on error).  Also change some of the error returns, becouse
NT_STATUS_UNSUCCESSFUL gives a most useless error message on the client.

As for which error, my logic is that a share without a valid VFS module is
not a valid share, and therefore should return the same error as a non-existant
share.

Andrew Bartlett
(This used to be commit 41178afdbd)
2003-01-06 06:15:34 +00:00
Andrew Bartlett
ef553ab814 Even when I can't manage to do QA, at least the build farm will catch some of
the silly stuff.

(fixes password changes from RAP based clients like smbpasswd)

Andrew Bartlett
(This used to be commit 066e4f9a4b)
2003-01-05 04:59:42 +00:00
Jeremy Allison
a26f2fbe2b Fix problem with "hide unreadable". stat file opens are baaack :-).
Jeremy.
(This used to be commit 6e0cfec165)
2003-01-03 19:07:26 +00:00
Gerald Carter
df4af79c78 patch to include support for daemontools from Michael Handler
(This used to be commit 4c48c475a2)
2003-01-03 17:32:11 +00:00
Jeremy Allison
1afa539299 pstring/fstring missmatches found by Andrew Bartlett.
Jeremy.
(This used to be commit 585a73b810)
2003-01-02 20:43:27 +00:00
Andrew Bartlett
81c6415aa1 Becouse these functions return a size_t, they can't return negitive numbers.
So a < 0 check is pointless, instead check against -1, which will be cast to
unsigned.

Andrew Bartlett
(This used to be commit c7e5797a95)
2003-01-02 13:01:44 +00:00
Andrew Bartlett
6d66fb308a BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
(This used to be commit 92a777d0ea)
2003-01-02 09:07:17 +00:00
Andrew Bartlett
60f9614400 Move our password change code along a little - use NTSTATUS, and implmenet
minimum password age and min password length for all password changes.

Andrew Bartlett
(This used to be commit 028f808c03)
2003-01-01 04:19:34 +00:00
Simo Sorce
2eb7a80a46 fix for bad check spotted by Ray Simard <ray@sylvan-glade.com>
(This used to be commit 63a669475b)
2002-12-31 10:23:37 +00:00
Shirish Kalele
ab42271cd6 Add msdfs proxy functionality to HEAD.
(This used to be commit 9df93b1ffc)
2002-12-29 23:29:08 +00:00
Jeremy Allison
7f23546730 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
(This used to be commit 842e08e52a)
2002-12-20 20:23:06 +00:00
Jeremy Allison
72e16f233d Fix for old DOS client when veto files is set to /.*/
Jeremy.
(This used to be commit 636ab292db)
2002-12-13 19:07:25 +00:00
Jeremy Allison
120ead2f94 Added "kernel change notify" boolean to allow easier valgrind testing.
Jeremy.
(This used to be commit ac856fbb96)
2002-12-12 02:01:53 +00:00
Jeremy Allison
7dd847ba9c Fixed auth module code. Added VALGRIND defines to reduce spurious warnings.
Jeremy.
(This used to be commit ff3a8d3728)
2002-12-11 23:54:46 +00:00
Jeremy Allison
76e685e628 The element in fsp->print_job should be a RAP jobid, not a uint32 RPC
jobid. This was causing Win9x client "set name" calls to fail.
Still need one cleanup fix to finish.
Jeremy.
(This used to be commit 15f0bad1fc)
2002-12-05 03:59:56 +00:00
Tim Potter
bb2aa240de Remove FILE_MACRO as __FILE__ is ANSI C.
(This used to be commit 2a9d183cf6)
2002-12-04 23:57:15 +00:00
Jeremy Allison
39734e2be8 Added Volker's directory fix - save the attributes
from the first call.
Jeremy.
(This used to be commit 2fe7504a08)
2002-12-04 22:48:25 +00:00
Gerald Carter
4ba8936707 change_trust_account_password() must always use the PDC for rpc
password changes.

jerry
(This used to be commit 974822526f)
2002-12-04 20:13:29 +00:00
Jeremy Allison
a6a0b156bd Need brackets around macro args. Spotted by Patrick Welche <prlw1@newn.cam.ac.uk>.
Jeremy.
(This used to be commit 51c2cf3a9c)
2002-12-04 18:44:21 +00:00
Jeremy Allison
d67ec06b7b Missed the removal of the incorrect ifdef.
Jeremy.
(This used to be commit 9cfa245bba)
2002-12-04 03:21:18 +00:00
Jeremy Allison
9dc3ec5af3 Fix for 64 bit issues with oplocks and allocation size.
Jeremy.
(This used to be commit 4a9c995e50)
2002-12-04 03:12:28 +00:00
Jeremy Allison
e7f2ae9c7f Reformat of reply.c before Volker's patch.
Jeremy.
(This used to be commit d41858b9e6)
2002-12-03 23:57:55 +00:00
Jeremy Allison
9a0b6a2273 Fixed nasty bug where file writes with start offsets in the range
0x80000000 -> 0xFFFFFFFF would fail as they were being cast
from IVAL (uint32) to SMB_OFF_T (off_t or off64_t, both *signed* types).
The sign extension would cause the offset to be treated as negative.
Thanks to Herb for helping me track this one down (IRIX is good for large
file tests :-).
Jeremy.
PS. That horrid EXEXIST thing has broken configure.....
(This used to be commit fc7d3faed7)
2002-12-03 08:02:21 +00:00
Andrew Bartlett
a65dc990f8 As per Jeremy's request back this out, so as to re-gain the implicit length
check.

Andrew Bartlett
(This used to be commit 323088259f)
2002-12-01 19:52:09 +00:00
Andrew Bartlett
3924f97eac No need for fstring manipulation here (Tcon&X), just use string pointers.
Andrew Bartlett
(This used to be commit b072bb9c84)
2002-12-01 03:16:59 +00:00
Andrew Bartlett
65643516d7 Having waited for *way* too long, this is mimir's namecache and trusted domain
cache code.

This uses gencache, mimir's new caching code that stores at text-based cache
of various data.

Mimir has done a *lot* of work on this patch, and it is finally time to
get it in CVS.

Andrew Bartlett
(This used to be commit 47f3bfe956)
2002-11-26 11:57:30 +00:00
Andrew Tridgell
18e55a69ff a better for for using %U in smb.conf
this follows the method used for remote_machine and also fixes the
problem of anonymous connections clobbering the string
(This used to be commit 9ead4fc3c3)
2002-11-19 23:44:24 +00:00
Jeremy Allison
cbecefb1b2 Very curious. It turns out attribute matching on truncate only matters
when opening truncate with current SYSTEM|HIDDEN -> NONE. It's fine to
truncate on open with current NONE -> SYSTEM | HIDDEN.
Jeremy.
(This used to be commit 801b87e0f7)
2002-11-19 01:45:55 +00:00
Andrew Tridgell
1000b717a8 the change in the way %U is handled to use current_user has broken
some basic usages like 'include = smb.conf.%U'

This changes fixes things again, by checking for reload after we setup
current_user in tconx.
(This used to be commit d664e6b4d2)
2002-11-18 03:11:59 +00:00
Andrew Bartlett
171f345282 Add const to PACKS()
(This used to be commit 0e87408eb0)
2002-11-15 21:27:55 +00:00
Jelmer Vernooij
2aaf85730a small patch to makesure we fallback to <xfs/xqm.h> if <linux/xqm.h> doesn't exist (e.g. in SuSE 8.1) (by metze)
(This used to be commit 5f16343e0d)
2002-11-13 21:51:08 +00:00
Jelmer Vernooij
ba7056a842 Load modules in lp_modules() after fork()
(This used to be commit 77afa4f167)
2002-11-13 19:04:17 +00:00
Jeremy Allison
250c980119 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit 82b8f749a3)
2002-11-12 23:15:52 +00:00
Andrew Bartlett
c501ac2bfa Compleatly remove support for logfile truncation. All logs are opened for
append writes.

(blessed by jra)

Andrew Bartlett
(This used to be commit 81633064dd)
2002-11-08 23:05:34 +00:00
Jelmer Vernooij
4d70634685 Make append_log work again
(This used to be commit 2fd496b49f)
2002-11-07 21:39:51 +00:00
Jim McDonough
9df2283b0c Stop using hardcoded transact commands
(This used to be commit ec0d94b4dd)
2002-11-07 14:39:49 +00:00
Tim Potter
ea24bb2da8 Merge of get_dc_list() api change. This was slightly more intrusive
than the version in APPLIANCE so watch out for boogs.
(This used to be commit 1e054e3db6)
2002-11-06 01:29:07 +00:00
Jeremy Allison
29546f160c Ensure can_delete returns correct error code.
Jeremy.
(This used to be commit 44db20f9f6)
2002-11-05 22:49:54 +00:00
Jeremy Allison
6c5e0cce56 Fix to correctly return NT_STATUS_DELETE_PENDING.
Jeremy.
(This used to be commit 075987f1db)
2002-11-05 21:46:33 +00:00
Tim Potter
ced085b0d2 Remove DRIVERFILE constant. It was removed with the old win95
printer driver stuff.
(This used to be commit cf6d2d9d9e)
2002-11-05 03:05:29 +00:00
Jelmer Vernooij
5883bc73c1 Handle -p correctly
(This used to be commit b69d5fffd9)
2002-11-04 14:50:08 +00:00
Jelmer Vernooij
7da7b4a464 Make IRIX happy
(This used to be commit aeb94bb0d7)
2002-11-04 14:08:11 +00:00
Jelmer Vernooij
670764e38c Remove obsolete function usage and some unused variables
(This used to be commit 162431a88c)
2002-11-02 18:58:55 +00:00
Jelmer Vernooij
25e9b03738 Convert to popt.
Removed -o and -a options - these have been broken since 2.2 without complaints from users
(This used to be commit c8589a567b)
2002-11-02 16:36:39 +00:00
Jeremy Allison
5593892caf Fix slowdown because of enumerating all print queues on every smbd startup.
Jeremy.
(This used to be commit d05b147fb3)
2002-10-31 23:41:02 +00:00
Andrew Bartlett
7c9923c9f6 Fix a nice little memory leak in our uid changing code.
Andrew Bartlett
(This used to be commit 5c4967c70d)
2002-10-29 08:21:40 +00:00
Jeremy Allison
608985f7ea Fix fd leak with kernel change notify.
Jeremy.
(This used to be commit 78df2c916a)
2002-10-28 22:04:47 +00:00
Jeremy Allison
7689a9c969 First cut of new ACL mapping code from Andreas Gruenbacher <agruen@suse.de>.
This is not 100% the same as what SuSE shipped in their Samba, there is
a crash bug fix, a race condition fix, and a few logic changes I'd like to
discuss with Andreas. Added Andreas to (C) notices for posix_acls.c
Jeremy.
(This used to be commit a81d700ae9)
2002-10-23 01:22:45 +00:00
Jeremy Allison
9b323a3c0d Fix for systems that allow more than 65536 open files per process.
Jeremy.
(This used to be commit ff537f10a0)
2002-10-22 22:17:06 +00:00
Gerald Carter
534220da60 merge from samba_3_0
removed the following parameters

  * postscript
  * printer driver
  * printer driver location
  * printer driver file

also removed the get_a_printer_driver_9x_compatible() function
(This used to be commit e7dd8cf903)
2002-10-21 20:28:11 +00:00
Volker Lendecke
5dbf435408 This moves the group mapping API into the passdb backend.
Currently this calls back to mapping.c, but we have the framework
to get the information into LDAP and the passdb.tdb (should we? I
think so..).

This has received moderate testing with net rpc vampire and
usrmgr. I found the add_groupmem segfault in add_aliasmem as
well, but that will be another checkin.

Volker
(This used to be commit f30095852f)
2002-10-21 19:28:56 +00:00
Andrew Tridgell
48a56c12e2 add a 'mangle prefix' option to allow people to tune the number of
characters used in the prefix for 8.3 names in the hash2
algorithm. The longer the prefix the more readable the 8.3 names will
be, but the weaker the hash.

this was added because of someone complaining that the new hashing
algorithm was unreadable but the old one was broken :)
(This used to be commit 3ca3cc838e)
2002-10-21 04:30:51 +00:00
Jeremy Allison
389a16d9d5 Added new error codes. Fix up connection code to retry in the same way
that app-head does.
Jeremy.
(This used to be commit b521abd86b)
2002-10-17 17:10:29 +00:00
Jeremy Allison
909ac9ed0d Change default of max_xmit to match W2K. Ensure NT negprot uses it.
Jeremy.
(This used to be commit e5fbfbcc9d)
2002-10-15 21:35:41 +00:00
Andrew Tridgell
5139da0bc6 fixed a crash bug on 64 bit systems. Thanks to Anton Blanchard for
finding this.
(This used to be commit 4ba8608020)
2002-10-15 05:40:24 +00:00
Andrew Bartlett
4ac9ccfde4 Nice *big* patch from metze.
The actual design change is relitivly small however:

It all goes back to jerry's 'BOOL store', added to many of the elements in a
SAM_ACCOUNT.  This ensured that smb.conf defaults did not get 'fixed' into
ldap.  This was a great win for admins, and this patch follows in the same way.

This patch extends the concept - we don't store values back into LDAP unless
they have been changed.  So if we read a value, but don't update it, or we
read a value, find it's not there and use a default, we will not update
ldap with that value.  This reduced clutter in our LDAP DB, and makes it
easier to change defaults later on.

Metze's particular problem was that when we 'write back' an unchanged value,
we would clear any muliple values in that feild.  Now he can still have his
mulitivalued 'uid' feild, without Samba changing it for *every* other
operation.

This also applies to many other attributes, and helps to eliminate a nasty
race condition.  (Time between get and set)

This patch is big, and needs more testing, but metze has tested usrmgr, and
I've fixed some pdbedit bugs, and tested domain joins, so it isn't compleatly
flawed ;-).

The same system will be introduced into the SAM code shortly, but this fixes
bugs that people were coming across in production uses of Samba 3.0/HEAD, hence
it's inclusion here.

Andrew Bartlett
(This used to be commit 7f237bde21)
2002-10-12 03:38:07 +00:00
Jeremy Allison
24d8333c72 Turns out with Win9x, we could occasionally return from unix_convert() given
a mangled name without a valid stat struct if the file existed. This would
then cause open_file_shared1() to erroneously think the file open was new,
thus not check for oplock break, thus causing a spurious EAGAIN reply to
the open on a file we already had kernel oplocked.... (phew - that was fun
to track down :-).
Jeremy.
(This used to be commit e23210e473)
2002-10-11 01:17:41 +00:00
Jeremy Allison
9727da3260 Fix based on Jim McDonough's code for ACL inheritance problem.
Jeremy.
(This used to be commit a6b3acfc7b)
2002-10-08 00:19:56 +00:00
Jeremy Allison
c983424abb Fix from Andreas Gruenbacher <agruen@suse.de> to prevent ACL set on read-only
share.
Jeremy.
(This used to be commit 80d30dbfec)
2002-10-07 18:06:17 +00:00
Richard Sharpe
4506f260fb Push Steve Langasek's fix ...
(This used to be commit 0325b938f5)
2002-10-05 06:50:43 +00:00
Gerald Carter
83e58265b5 merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
(This used to be commit 38c9e42998)
2002-10-04 03:51:43 +00:00
Jeremy Allison
a237fb349a Added ASCII art to make this clearer.
Jeremy.
(This used to be commit 96e9ff9054)
2002-10-03 19:04:46 +00:00
Jeremy Allison
1252fda04f Write cache bugfix from Rasmus Borup Hansen, system adm. Email: rbh@math.ku.dk
Jeremy.
(This used to be commit 971b82beb7)
2002-10-03 18:11:12 +00:00
Andrew Bartlett
d386b71d32 Metze claims that without this his win2k server gets horribly confused looking
for all sorts of AD things in lp_realm().  We need to get some non-Win2k
NTLMSSP and chase this up a bit, but this will do for now.

(Hmm, this might affect NTLMv2 as well)

Andrew Bartlett
(This used to be commit 0e6babc306)
2002-09-25 12:09:56 +00:00
Andrew Bartlett
8a3bb8b36b Kill of Get_Pwnam_Modify and smb_getpwnam(). The latter assumes some things
that just don't apply any more - now that we always keep username and domain
seperate.  Also, the policy it was trying to permit is now implemented by the
auth code.

Andrew Bartlett
(This used to be commit 760c0740ca)
2002-09-25 09:55:41 +00:00
Andrew Bartlett
2bd2b243fc Move to common user token debugging, and ensure we always print both the
NT_TOKEN and the unix credentials - as we incresingly use the NT stuff we want
to make it easy to check they don't get out of wack.

Andrew Bartlett
(This used to be commit a3882a1925)
2002-09-25 09:34:43 +00:00
Jeremy Allison
b952ddfbe6 Merge of "profile acls" code.
Jeremy.
(This used to be commit cfd1bf250b)
2002-09-25 05:11:25 +00:00
Jeremy Allison
e633122fae "@" is valid in NetBIOS domain names.
Jeremy.
(This used to be commit 5c4857d8e0)
2002-09-20 19:09:28 +00:00
Andrew Tridgell
8ea2d8f255 change ADS negprot to match more closely the options used by w2k. This
affects the principal used and the order of SPNEGO OIDs
(This used to be commit e8ff1c0819)
2002-09-20 09:37:02 +00:00
Jeremy Allison
a5df564e05 Use sendfile in readbraw.
Jeremy.
(This used to be commit a77966645a)
2002-09-19 18:20:38 +00:00
Jeremy Allison
7af9901fdb Added "use sendfile" per share option.
Jeremy.
(This used to be commit 28466ff42c)
2002-09-18 20:36:50 +00:00
Jeremy Allison
8b4bafc76f We had a race condition when changing a machine acount password as we
were no longer locking the secrets entry. I saw this on a live system.
Jeremy.
(This used to be commit 660dafcbb2)
2002-09-18 00:30:00 +00:00
Jeremy Allison
9bab1d0c1a Actually use sendfile if selected.
Jeremy.
(This used to be commit 5881f0a226)
2002-09-17 19:48:19 +00:00
Andrew Tridgell
3fefef7a72 disable stat cache when case sensitive
(This used to be commit 3401c3616b)
2002-09-17 12:09:46 +00:00
Jeremy Allison
f74086ccf0 Attempt to make broken Linux sendfile work.... Still in progress.
Jeremy.
(This used to be commit f956a4d29d)
2002-09-17 01:00:03 +00:00
Jeremy Allison
febd3f929b Added fix for broken Linux (no sendfile64). When offset + count > 2GB
then return ENOSYS and let the upper layer handle it.
Jeremy
(This used to be commit 872dfd87cd)
2002-09-14 00:34:46 +00:00
Jeremy Allison
6cf499ecff Fixed up FreeBSD sendfile code - only Solaris left then I can add the
configure tests...
Jeremy.
(This used to be commit 9dad88e1d4)
2002-09-12 18:18:35 +00:00
Jeremy Allison
4f613ac61e First cut at portable sendfile code. Only used in readX at the moment
and doesn't actually call sendfile. Needs to be vectored through the
VFS and tested on all supported platforms (Solaris/HPUX/FreeBSD/Linux).
Linux doesn't actually work (2.4.19 kernel) at the moment because it
doesn't have a 64-bit clean sendfile.
Jeremy.
(This used to be commit fd772ca7b1)
2002-09-12 02:12:52 +00:00
Jeremy Allison
36c50870f1 Formatting tidyups before I look at implementing the sendfile in READX.
Jeremy.
(This used to be commit 640f061ab2)
2002-09-11 01:44:32 +00:00
Jeremy Allison
99928976ea Ensure we've failed a lock with a lock denied message before automatically
pushing it onto the blocking queue.
Jeremy.
(This used to be commit 237e36124c)
2002-09-11 01:05:22 +00:00
Jeremy Allison
6b956c8c1e Fix missing braces around push lock call.
Jeremy.
(This used to be commit c93b40f43d)
2002-09-11 00:50:13 +00:00
Jeremy Allison
df920a60b5 Added final Steve French patch for "required" attributes with old
dir listings. Added regression test in smbtorture (in HEAD) also.
Jeremy.
(This used to be commit 3c9d24d7c3)
2002-09-10 01:58:51 +00:00
Jeremy Allison
8de41d5948 Merged Steve French's fix for OS/2 EA return error being removed.
Jeremy.
(This used to be commit af2168c034)
2002-09-09 21:48:23 +00:00
Jeremy Allison
9a3542b80e Patch from Steve French to fix difference in responses to
smbclient //server/share
ls /
on Samba and Windows 2000.
Jeremy.
(This used to be commit b3fe55838d)
2002-09-09 21:06:06 +00:00
Andrew Bartlett
789d51b42c This is the 'easy' parts of the trusted domains patch n+3 patch from
Rafal Szczesniak <mimir@diament.ists.pwr.wroc.pl>

It includes a conversion of make_user_info*() to NTSTATUS and some minor
changes to other files.

It also picks up on a nasty segfault that can occour in some security=domain
cases.

Andrew Bartlett
(This used to be commit d1e1fc3e4b)
2002-09-06 13:37:11 +00:00
Andrew Bartlett
2d88135714 patch from metze: add a 'vfs' debug class
(This used to be commit 601b56e04f)
2002-09-06 11:58:18 +00:00
Andrew Bartlett
a92724025a Revert accidental commit - I'll need to do a fair bit more testing before I
commit changes to NTLMSSP flags.
(This used to be commit d200770796)
2002-09-06 11:49:16 +00:00
Andrew Bartlett
eec38ee3bb Patch from "Stefan (metze) Metzmacher" <metze@metzemix.de>
to extend the ADS_STATUS system to include NTSTATUS, and to provide a better
general infrustructure for his sam_ads work.

I've also added some extra failure mode DEBUG()s to parts of the code.

NOTE:  The ADS_ERR_OK() macro is rather sensitive to braketing issues - without
the final set of brakets, the test is essentially inverted - causing some
intersting 'error = success' messages...

Andrew Bartlett
(This used to be commit 5b9a7ab901)
2002-09-06 11:46:59 +00:00
Andrew Bartlett
c4d1f9a1e8 Oops...
(This used to be commit 9a6f932da1)
2002-09-06 10:43:52 +00:00
Andrew Bartlett
e4eed6e8f4 One less user of Get_Pwnam_modify()...
Andrew Bartlett
(This used to be commit 06b8a6fef4)
2002-09-06 10:38:26 +00:00
Jeremy Allison
19a7d460e4 We shouldn't add printing flag here.
Jeremy.
(This used to be commit f00102ba77)
2002-09-05 04:33:52 +00:00
Tim Potter
36cab08d37 Send any queued up print notify messages in exit_server() so they
don't get lost if the client exits before timeout_processing()
has a chance to run.
(This used to be commit d7dde74aae)
2002-09-05 04:33:07 +00:00
Jeremy Allison
cbaa14857b Merge of (apparently working :-) new printing notify code.
Jeremy.
(This used to be commit 8595c6ce4d)
2002-09-04 21:59:38 +00:00
Jeremy Allison
a1aafce4dc Add bcast_msg_flags to connection struct. Allows sender to filter when
sending broadcast messages. Also initial cut-down of printing notify
messages (not yet finished).
Jeremy.
(This used to be commit aca3337196)
2002-09-04 19:13:06 +00:00
Jeremy Allison
fedc33df42 Ensure we open UNIX fifo's non-blocking like we used to do.
Jeremy.
(This used to be commit 53f411df10)
2002-09-03 20:10:25 +00:00
Richard Sharpe
4cb4534dd6 Convert M_DEBUG(0 to M_DEBUG(10 for non-error cases ...
(This used to be commit d5c10e7dc7)
2002-08-31 16:17:36 +00:00
Andrew Bartlett
7aca67c3e9 Add a bit of 'const' and move a lot of our 'repeditive' DEBUG() statements to
'DEBUGADD', so we don't repeat headers.  (Makes them much easier to read).

(Based on patch by kai)

Andrew Bartlett
(This used to be commit 9deada345c)
2002-08-31 06:59:00 +00:00
Jeremy Allison
35b7dfaa20 Fix bug with stat mode open being done on read-only open with
truncate.
Jeremy.
(This used to be commit 18b9cbd857)
2002-08-30 19:29:59 +00:00
Jeremy Allison
fcdecb7c29 Correctly fail opens with mismatching SYSTEM or HIDDEN attributes if we
are mapping system or hidden.
Jeremy.
(This used to be commit bd1e3df9ff)
2002-08-30 18:57:23 +00:00
Jeremy Allison
790b85f5e2 Return correct FILE_SUPERSEDED response - IFSTEST strikes again...
Jeremy.
(This used to be commit df3e467eb7)
2002-08-28 19:47:48 +00:00
Simo Sorce
0a771a4f0b fix file_is_special test, was wrong.
(This used to be commit 850d6573ae)
2002-08-28 17:01:17 +00:00
Jeremy Allison
3a21fa3bb9 Move -4 to correct side of comparison.
Jeremy.
(This used to be commit d825026658)
2002-08-28 12:45:19 +00:00
Jeremy Allison
797af9369b Ensure we have at least smb_size bytes before processing a packet.
Jeremy.
(This used to be commit 0385f7d7ef)
2002-08-27 14:16:37 +00:00
Jeremy Allison
dc40c5fb2d Correct fix for nc problem.
Jeremy.
(This used to be commit 1f81b17718)
2002-08-26 20:29:10 +00:00
Jeremy Allison
dc0c3e97ca Reformatting only before real change.
Jeremy.
(This used to be commit ac21f280d5)
2002-08-26 20:26:25 +00:00
Jeremy Allison
e6ecd43dfc Reverted and tidied up the "special" files patch. Adds "hide special files"
option (set to false by default). Made checking for hide unreadable/writable
more efficient (less stat calls, less allocating printf calls).
Jeremy.
(This used to be commit 15ff5a48f9)
2002-08-26 16:38:08 +00:00
Andrew Bartlett
2560c73026 Updates!
- Don't print an uninitialised buffer in service.c
- Change some charcnv.c functions to take smb_ucs2_t ** instead of void **
- Update NTLMv2 code to use dynamic buffers
- Update experimental SMB signing code - still more work to do
- Move sys_getgrouplist() to SAFE_FREE() and do a DEBUG() on initgroups()
  failure.

Andrew Bartlett
(This used to be commit de1964f7fa)
2002-08-26 03:08:37 +00:00
Simo Sorce
699fcb65fc do not expose special files, only files, directories and links (and we
should really check if a link points to a special file and deny access
imho), expose no fifo, socket, devices ...
(This used to be commit 5995411334)
2002-08-24 01:33:25 +00:00
Jeremy Allison
9c31d18987 Merged initial allocation code for IFSTEST fix.
Jeremy.
(This used to be commit 095e2bf946)
2002-08-23 15:51:28 +00:00
Herb Lewis
e6de7c24a5 move where got_sig_term and reload_after_sighup are defined.
populate cli structure with called name and calling name even for port
445 connects.
(This used to be commit 123eee6206)
2002-08-22 23:34:27 +00:00
Andrew Tridgell
0bc1feb2d6 made the CAP_UNIX test a bit cleaner
(This used to be commit 8c8b0dd381)
2002-08-22 22:51:28 +00:00
Herb Lewis
02f8ed7110 reload_after_sighup and got_sig_term are defined in server.c
(This used to be commit 667e2fe32f)
2002-08-22 21:15:17 +00:00
Jeremy Allison
1c01684451 Remember to check for UNIX extensions before saying we support them.
Jeremy.
(This used to be commit 2c7ad907eb)
2002-08-22 20:02:33 +00:00
Jeremy Allison
7490b8c2c7 We were returning incorrect flags in smb_action....
IFSTEST strikes again :-).
Jeremy.
(This used to be commit 4e0a256430)
2002-08-22 19:56:16 +00:00
Andrew Bartlett
68b9a4cebc Ensure we don't change to a user that we can't get an NT_TOKEN for.
(This used to be commit 9416289b57)
2002-08-22 17:05:35 +00:00
Jeremy Allison
d2915a466f Fixed IFSTEST errors with OpenParams... more to go.
Jeremy.
(This used to be commit 31a0c4ac33)
2002-08-22 00:10:02 +00:00
Jeremy Allison
00ec570634 Fix longstanding bug in Win2k clients by clearing the shortname
buffer before returning ascii short name.
Jeremy.
(This used to be commit d01bbd42ff)
2002-08-21 21:07:27 +00:00
Jeremy Allison
f744db7a5d IFSTEST fixes for open fid, nametoolong.
Jeremy.
(This used to be commit e53a81261e)
2002-08-20 20:54:32 +00:00
Andrew Bartlett
8674440d81 Based orginally by work by Kai, this patch moves our NT_TOKEN generation into
our authenticaion code - removing some of the duplication from the current
code.

This also gets us *much* closer to supporting a real SAM backend, becouse the
SAM can give us the right info then.

This also changes our service.c code, so that we do a VUID (rather than uid)
cache on the connection struct, and do full NT ACL/NT_TOKEN checks (or cached
equivilant) on every packet, for the same r or rw mode the whole share was open
for.

Andrew Bartlett
(This used to be commit d8122cee05)
2002-08-20 01:54:28 +00:00
Tim Potter
c0ac93697e Added comment about our implementation of the trans2
SMB_FILE_INTERNAL_INFORMATION possibly causing the failure of one of the
IFSKIT tests.
(This used to be commit ca73d24307)
2002-08-19 19:12:26 +00:00
Jeremy Allison
d94046af25 IFS kit test - don't allow TEMP attribute on directory open.
Jeremy.
(This used to be commit 81eacd926b)
2002-08-19 16:10:27 +00:00
Andrew Tridgell
c0f37b336b round lock timeouts in lockingX upwards to multiples of 1 second, so a
half second timout rounds to 1 not 0
(This used to be commit 282a64b085)
2002-08-18 20:13:09 +00:00
Andrew Tridgell
f18c3c757a added exact timing semantics on blocking locks
(This used to be commit aed32eb412)
2002-08-18 20:09:02 +00:00
Simo Sorce
789e6e6b4e A new utility to test VFS system and modules
Just now it is acommandline tool like smbclient and rpcclient that is able to
perform operations on the file system passing through the vfs layer

It is not complete yet, some functions have simply faked up data, but module
loading works yet and basic operations too.

Thanks to Eric Lorimer for helping out with the initial setup.

Simo.
(This used to be commit 42ae5eb826)
2002-08-18 18:04:00 +00:00