1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

2182 Commits

Author SHA1 Message Date
Jelmer Vernooij
4987119020 Remove obsolete defines (because of new modules system). We need
a way to track which modules have been builtin
(This used to be commit 0f724be38439af9284e51b7b9b8605e8956e51ba)
2003-03-25 12:05:23 +00:00
Gerald Carter
b7c4fa4cc6 win9x was suffered a case of the blues during a domain logon.
For some reason, explicitly setting the service type during the
tcon&X fixes this.
(This used to be commit c458179d21465165705e6c035776698cb824baf5)
2003-03-25 04:19:04 +00:00
Jelmer Vernooij
66c321232a Don't use old usage() function, but the one from popt.
Remove some useless arguments
(This used to be commit 8df30059ef100a4d5e21501d7746427b4d312589)
2003-03-24 14:32:11 +00:00
Jelmer Vernooij
41a09c3c53 Revoke some of the popt patch from metze I applied earlier today. It added
some double options and broke some parameters.
(This used to be commit d5f9b0275c91512e1926504f22aaeec2d104430d)
2003-03-24 14:15:14 +00:00
Jelmer Vernooij
11e9de855c Patch from metze to generalise POPT_COMMON_SAMBA, with some minor changes
(This used to be commit 2ddfed298d7f0b6e690275725a39c3ef107077ae)
2003-03-24 11:25:34 +00:00
Jelmer Vernooij
89cd467415 Add nicer --help headers
(This used to be commit e56ab71f1237a71c6ad4f321ce1db4e9397efd73)
2003-03-22 23:50:11 +00:00
Andrew Bartlett
5050e8ee1a Revert bogus part of previous patch.
(This used to be commit 3cddfe211da812a533611eecba5d5da55fd3cf2d)
2003-03-22 13:41:16 +00:00
Andrew Bartlett
a38e5e6850 Small clenaup patches:
- safe_string.h - don't assume that __FUNCTION__ is available
 - process.c - use new workaround from safe_string.h for the same
 - util.c - Show how many bytes we smb_panic()ed trying to smb_xmalloc()
 - gencache.c - Keep valgrind quiet by always null terminating.
 - clistr.c - Add copyright
 - srvstr.h - move srvstr_push into a .c file again, as a real function.
 - srvstr.c - revive, with 'safe' checked srvstr_push
 - loadparm.c - set a default for the display charset.

Andrew Bartlett
(This used to be commit a7eba37aadeb0b04cb1bd89deddb58be8aba825c)
2003-03-22 13:06:52 +00:00
Andrew Bartlett
d2d29ea953 Clobber our SMB buffers between packets. I hope this will help find bugs
where we assume the buffer is zero, when it might not be (ie due to, previous
packets).

Andrew Bartlett
(This used to be commit 191b0ab4d7c35c83d2bb2052b2e37d01fbf37b45)
2003-03-21 22:37:14 +00:00
Volker Lendecke
afcb58ac9e NT4 as well as W2k respond with IPC regardless of what service
type the client requested in the TCONX when connecting to IPC$.

It is very well possible that this also applies to the DISK and PRINTER
share types, not only IPC.

Found this while trying to join a HEAD domain from NT4SP6.

Volker
(This used to be commit d42eb2116df4bb82c4199a688a057cd0a9f435ed)
2003-03-20 16:53:07 +00:00
Jelmer Vernooij
c7e720c87b Patch from Samuel Thibault to convert messages from unix to dos charset. Works
on 2000.
sending messages to 9x needs to be fixed, but that didn't work anyway
(This used to be commit ca066502a2a3dbdd8943d515c9c6d21e62d757b6)
2003-03-20 16:42:39 +00:00
Jelmer Vernooij
47ea3a2bf2 Put in the new modules system. It's now used by passdb and rpc. I will
put a doc about it in dev-doc later today.
(This used to be commit af7bfee0c6902c07fdb8d3abccf4c8d6bab00b5a)
2003-03-19 18:45:19 +00:00
Jeremy Allison
736c753841 Ensure dev in make_connection is const.
Jeremy.
(This used to be commit e8155fade61e9dc308a82f442453803160c36806)
2003-03-18 23:51:18 +00:00
Andrew Bartlett
e0e31ca14a Add copyright.
(This used to be commit a7f9c3657ff052e382e290059f50f1d9812b8221)
2003-03-17 22:22:46 +00:00
Andrew Bartlett
99e5d02f74 Brain fart - make sure we truncate the right string...
Andrew Bartlett
(This used to be commit 32eb2cdca62a784d96207507e273bbbf77b0c6c3)
2003-03-17 10:58:05 +00:00
Andrew Bartlett
0273df0bf7 Fix const warnings.
Andrew Bartlett
(This used to be commit fc1408d5d1a8b64dfd20268ab6f4a5f2a007614b)
2003-03-17 09:18:06 +00:00
Andrew Bartlett
1331a361bd Add const.
(This used to be commit 02f81719c7c179b61663bdf789c01ab62286fea2)
2003-03-17 09:08:34 +00:00
Andrew Bartlett
a564fed756 More statcache fixes - and add a bit more doco.
Andrew Bartlett
(This used to be commit 0e8dd52f6973ac5219e2c2dd53824de71f512083)
2003-03-17 08:03:08 +00:00
Andrew Bartlett
1171b0c9ac Fix memory leaks and add parinoioa code to our stat() cache.
Andrew Bartlett
(This used to be commit 3fd07bd25eefdb2a7a6891fa1169ab2425607249)
2003-03-17 03:47:15 +00:00
Andrew Bartlett
3ecf5d6638 Missed one when I move 'share_sanity_checks' to use an fstring for 'dev'.
Andrew Bartlett
(This used to be commit a0208a4f74f9c61eb1e346d9cb62dbe00ef4c24a)
2003-03-16 22:07:36 +00:00
Andrew Bartlett
7b18c5d164 Make sure we mark the assumption of a fstring parameter for 'devicetype'
in the function prototype, and change callers to respect this.

Andrew Bartlett
(This used to be commit 9f3d3c380120f16d76d68f346799282d61eec892)
2003-03-16 13:24:36 +00:00
Andrew Bartlett
c6cf087741 Add const.
(This used to be commit 5371720971bc60a4cfba0460614306f322aa10b8)
2003-03-16 13:23:12 +00:00
Andrew Bartlett
400bb4bfab - Make ReadDirName return a const char*.
- Consequential changes from that

 - mark our fstring/pstring assumptions in function prototypes

Andrew Bartlett
(This used to be commit fe2bc64bc439b27387b8f326b0f4f3bfcc3d04a1)
2003-03-16 13:21:12 +00:00
Andrew Bartlett
644ab8e9b1 Try to avoid dereferencing a null pointer.
Andrew Bartlett
(This used to be commit 4e96585b60512905776c2c6692c76d45241f089d)
2003-03-16 13:16:42 +00:00
Andrew Bartlett
6ba75b540f New statcache internals - this time it's actually possible to follow what's
going on.

In particular, add doxygen documentation.

Andrew Bartlett
(This used to be commit 7ff77ab46c63eca3b6edf18f39024eadb83a1a90)
2003-03-16 13:15:29 +00:00
Andrew Bartlett
02704f9733 Minor fixes.
- signed/unsigned
 - quieten warning about assignment as truth value
 - whitespace

Andrew Bartlett
(This used to be commit a13ce0df4b4a776fa635a1fb804dd00d195f58d0)
2003-03-15 08:18:29 +00:00
Andrew Bartlett
3b5bc93e9d String handling parinoia fixes.
This patch enables the compile-time checking of strings assable by means of
sizeof().  (Original code had the configure check reversed).

This is extended to all safe_strcpy() users, push_string and pull_string,
as well as the cli and srv derivitives.  There is an attempt to cap strings
at the end of the cli buffer, and clobber_region() of the speified length
(when not -1 :-).

Becouse of the way they are declared, the 'overmalloc a string' users of
safe_strcpy() have been changed to use overmalloc_safe_strcpy() (which skips
some of the checks).

This whole ball of mud worked fine, until I pulled out my 'fix' for our
statcache.  When jeremy fixes that, we should be able to get back to testing
this stuff.

This patch also includes a 'marker' of the last caller to clobber_region (ie,
the function that called pstrcpy() that called clobber_region) to assist in
debugging problems that may have smashed the stack.  This is printed at
smb_panic() time.  (Original idea and patch by metze).

It also removes some unsused functions, and #if 0's some others that are
unused but probably should be used in the near future.

For now, this patch gives us some confidence on one class of trivial parsing
error in our code.

Andrew Bartlett
(This used to be commit 31f4827acc2a2f00399a5528fc83a0dae5cebaf4)
2003-03-15 07:14:55 +00:00
Andrew Bartlett
44f9f1042c Clean up the VFS module loading logic by making the parameter an P_LIST,
rather than a runtime-parsed string.

Andrew Bartlett
(This used to be commit 3465cd6cd92c39c018979b5a82acbddca0927623)
2003-03-15 06:41:31 +00:00
Andrew Bartlett
c3221b8377 Found by my new checking code (yet to be commited):
Allow a service longer than 4 characters in CORE tcon.

Andrew Bartlett
(This used to be commit b56613c1cc13ebd5c9ba11a35d2f96c4c3eb0628)
2003-03-15 06:34:32 +00:00
Gerald Carter
7ae555c43c fix WinXP & Win2K3 remote_arch and check pointer in ntlmssp code before dereferencing
(This used to be commit 2487480228b99183cab9e34ab497997e0c144ed6)
2003-03-14 23:11:19 +00:00
Jeremy Allison
15ae0c4ded Ensure we count the length correctly in mangle_map.
Jeremy.
(This used to be commit 596705198c555568da208f59008ab87c5164bfb4)
2003-03-12 19:08:01 +00:00
Gerald Carter
c992f66d73 adding some initiaial code to sert %a to Win2K3 (using Native LanMan string from .NET RC2)
(This used to be commit 4c823e61d14a33344deb887043b60b2e3c83416f)
2003-03-12 15:40:43 +00:00
Jeremy Allison
0a2d131a35 We use unsigned now, so use %u.
Jeremy.
(This used to be commit 01727b0296ee407e49444b9d9c4e7993892cb537)
2003-03-11 20:57:41 +00:00
Jeremy Allison
77916f652f Fix up zero termination. Spotted by Sebastian Krahmer <krahmer@suse.de>.
Jeremy.
(This used to be commit 69becdb563b2620513931811a6695481bebcceed)
2003-03-11 18:10:36 +00:00
Andrew Bartlett
8cad904f38 Don't segfault on make_server_info_guest() failure - instead return the
error code.

make_server_info_guest() requires an entry in the SAM at the moment, but
this will change before release.

Andrew Bartlett
(This used to be commit 6a956390fa253e87e38b3f1909f13595fbf2767a)
2003-03-10 12:08:32 +00:00
Andrew Bartlett
01289b14a7 Make sure that the 'remote' machine name can only be set once. For some weird
reason, during a Win2003 installation, when you select 'domain join' it sends
one machine name in the name exchange, and litraly 'machinename' during the
NTLMSSP login.

Also fix up winbindd's logfile handling, so that it matches smbd and nmbd.

(This helps me, by seperating the logs by pid).

Andrew Bartlett
(This used to be commit afe5a3832f79131fb74461577f1db0e5e8bf4b6d)
2003-03-08 10:22:50 +00:00
Jeremy Allison
7b2409214f Fix typo in earlier fix, caught by Ranjit @ HP.
Jeremy.
(This used to be commit 13ab94fa73dbaf54da0169bbcf4d027d5c07d207)
2003-03-08 01:16:30 +00:00
Jeremy Allison
eed8772da1 Use ERROR_NT, not ERROR_DOS as Andrew Bartlett pointed out.
Jeremy.
(This used to be commit c0930e6d15eb68f06453d9b67142ccd7fb1370a0)
2003-03-07 23:34:55 +00:00
Jeremy Allison
24c95539d5 Missed parentheses around complex logic.
Jeremy.
(This used to be commit e81427c2d69be166afad94bc083e750e8f48fba7)
2003-03-07 19:46:51 +00:00
Jeremy Allison
6a141b7963 Patch from Michael Steffens. In his own words :
-------------------------------------------------------------------------
I think there are basically two problem:

  1. Windows clients do not always send ACEs for SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ,
     and SMB_ACL_OTHER.
     The function ensure_canon_entry_valid() is prepared for that, but tries
     to "guess" values from group or other permissions, respectively, otherwise
     falling back to minimum r-- for the owner. Even if the owner had full
     permissions before setting ACL. This is the problem with W2k clients.

  2. Function set_nt_acl() always chowns *before* attempting to set POSIX ACLs.
     This is ok in a take-ownership situation, but must fail if the file is
     to be given away. This is the problem with XP clients, trying to transfer
     ownership of the original file to the temp file.

The problem with NT4 clients (no ACEs are transferred to the temp file, thus
are lost after moving the temp file to the original name) is a client problem.
It simply doesn't attempt to.

I have played around with that using posic_acls.c from 3.0 merged into 2.2.
As a result I can now present two patches, one for each branch. They
basically modify:

  1. Interpret missing SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ, or SMB_ACL_OTHER
     as "preserve current value" instead of attempting to build one ourself.
     The original code is still in, but only as fallback in case current values
     can't be retrieved.

  2. Rearrange set_nt_acl() such that chown is only done before setting
     ACLs if there is either no change of owning user, or change of owning
     user is towards the current user. Otherwise chown is done after setting
     ACLs.

It now seems to produce reasonable results. (Well, as far as it can. If
NT4 doesn't even try to transfer ACEs, only deliberate use of named default
ACEs and/or "force group" or the crystal ball can help :)
-------------------------------------------------------------------------
Jeremy.
(This used to be commit 8ec20cbae7ca7e685b1a4186d8482c7405915dc3)
2003-03-07 19:37:27 +00:00
Jeremy Allison
cea6fd0b0a Fix noticed by Corny.Bondad@hp.com. Ensure we free up memory on error exit.
Jeremy.
(This used to be commit 1cbd53dc3cd2d56f5e62d42fed5d589efcecb8f8)
2003-03-07 00:34:43 +00:00
Jeremy Allison
3327f13795 Found at Connectathon, .NET RC1 arranges trans/trans2/nttrans parameters
differently to W2K, cope with this.
Jeremy.
(This used to be commit 172f415c9eaa4d310a52794e3dc1a6bc92206ce4)
2003-03-07 00:30:29 +00:00
Andrew Bartlett
6684c85714 more off-by-one safe_strcpy()
(This used to be commit d8d2d5e75503ae2b6532a25e4c9bbcdf20cc60af)
2003-03-06 08:24:39 +00:00
Andrew Bartlett
7f15d5828f Another pstrcpy() into malloc()ed buffer fix.
Andrew Bartlett
(This used to be commit bd0c84d60b703e89081838a7cfa1eb1b4f45ad0a)
2003-03-03 23:53:35 +00:00
Jeremy Allison
6a58faf462 Const warning fixes.
Jeremy.
(This used to be commit 3ad62ebe26d8c6b82f8618eea11d104b3ab0ec18)
2003-03-03 20:12:07 +00:00
Andrew Tridgell
9043696121 i forgot to commit the privilege db init call
(This used to be commit e8ec2b118071ce1d8cbfbcebce3781ac753c5c22)
2003-03-01 10:47:38 +00:00
Gerald Carter
17c417e6e6 don't forget the NULL
(This used to be commit f80610120483c929afbec83d2b8649cb3e5111b0)
2003-02-27 23:52:37 +00:00
Gerald Carter
3a7d807ec9 and the winner of "i should have just written it in assembly
is..."

don't use pstrcpy() when you are not dealing with pstrings.
(This used to be commit 7d547f50f914747291acc71fd3544ad92ce91f0e)
2003-02-27 23:24:26 +00:00
Gerald Carter
dc1cd583cb don't pass NULL pointers to strcmp()
(This used to be commit 6631984b12a3f74b93f7031c433dd81d6586a5df)
2003-02-27 21:37:54 +00:00
Gerald Carter
97e7d2ffae additional fix for CR 601
* distinguish WinXP from Win2k
  * add a 1/3 of a second delay in OpenPrinter
    in order to trigger a LAN/WAN optimization in
    2k clients.
(This used to be commit 96570699d1b715f47c35aa211da6ec18f6fc4109)
2003-02-27 21:21:02 +00:00