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

1549 Commits

Author SHA1 Message Date
Jelmer Vernooij
96b5d5bdfd - Support absolute paths in vfs and charset modules
- Fix typo in Makefile.in
- Fix compatibility with older vfs modules (from patch by metze)
- Build some modules shared by default and some static (and fall
  back to static when dlopen() is not available)
(This used to be commit aa36f462d9)
2003-03-31 15:06:34 +00:00
Jelmer Vernooij
8bb5a02f8c Fix formatting of back traces - pathc by metze
(This used to be commit 9cc17bcfe6)
2003-03-31 12:29:50 +00:00
Jelmer Vernooij
7ea0ef92cb - Point users at the HOWTO Collection instead of 'README' in modules/mysql.c
- Make passdb work with absolute paths (passdb backend = /path/to/smbpasswd.so works now). vfs, rpc and charset will follow
(This used to be commit 794d3ed036)
2003-03-30 12:42:18 +00:00
Gerald Carter
6cc35405ab fix CIDR hosts allow/deny notation
(This used to be commit 0dc6115694)
2003-03-28 15:42:57 +00:00
Jelmer Vernooij
fa0ea6d561 Use SAFE_FREE() instead of plain free() - pointed out by metze
(This used to be commit b49436d020)
2003-03-26 13:49:23 +00:00
Jelmer Vernooij
0eff00c692 Output backtrace to logfile in smb_panic(), as suggested by mbp
(only on systems that support it, of course)
(This used to be commit bf439d733d)
2003-03-26 12:53:28 +00:00
Jelmer Vernooij
5ee88b1891 We need to 'preprocess' in popt_common_samba as well
(This used to be commit 37ee8aecf4)
2003-03-25 10:37:58 +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 d5f9b0275c)
2003-03-24 14:15:14 +00:00
Jelmer Vernooij
9ae249c6f1 Add modules support to charset
(This used to be commit cf3d31b980)
2003-03-24 12:47:21 +00:00
Jelmer Vernooij
11e9de855c Patch from metze to generalise POPT_COMMON_SAMBA, with some minor changes
(This used to be commit 2ddfed298d)
2003-03-24 11:25:34 +00:00
Andrew Bartlett
1f5e93e2e7 NTLM Authentication:
- Add a 'privileged' mode to Winbindd.  This is achieved by means of a directory
  under lockdir, that the admin can change the group access for.

- This mode is now required to access with 'CRAP' authentication feature.
- This *will* break the current SQUID helper, so I've fixed up our ntlm_auth
  replacement:
 - Update our NTLMSSP code to cope with 'datagram' mode, where we don't get a
   challenge.
 - Use this to make our ntlm_auth utility suitable for use in current Squid 2.5
   servers.
 - Tested - works for Win2k clients, but not Win9X at present.  NTLMSSP updates
   are needed.
 - Now uses fgets(), not x_fgets() to cope with Squid environment (I think
   somthing to do with non-blocking stdin).

- Add much more robust connection code to wb_common.c - it will not connect to
  a server of a different protocol version, and it will automatically try and
  reconnect to the 'privileged' pipe if possible.
  - This could help with 'privileged' idmap operations etc in future.

- Add a generic HEX encode routine to util_str.c,
- fix a small line of dodgy C in StrnCpy_fn()

- Correctly pull our 'session key' out of the info3 from th the DC.  This is
  used in both the auth code, and in for export over the winbind pipe to
  ntlm_auth.

- Given the user's challenge/response and access to the privileged pipe,
  allow external access to the 'session key'.  To be used for MSCHAPv2
  integration.

Andrew Bartlett
(This used to be commit dcdc75ebd8)
2003-03-23 13:03:25 +00:00
Jelmer Vernooij
a76d82616a Use True, not TRUE
(This used to be commit eeeeb37fc6)
2003-03-23 00:30:17 +00:00
Jelmer Vernooij
52cee834d0 Don't crash when initialising tdb fails
(This used to be commit b18d02891b)
2003-03-23 00:10:35 +00:00
Jelmer Vernooij
94837e2125 Add -U, -N, -i, -A, -W to popt.
(This used to be commit 5a88d78f67)
2003-03-22 23:48:02 +00:00
Jelmer Vernooij
22e62916d8 - Use FUNCTION_MACRO, not __FUNCTION__.
- Add some const
(This used to be commit e149e70717)
2003-03-22 23:25:44 +00:00
Andrew Bartlett
1ce67b7672 Valgrind found a few memory leaks!
Andrew Bartlett
(This used to be commit fb680f610c)
2003-03-22 23:25:09 +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 a7eba37aad)
2003-03-22 13:06:52 +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 ca066502a2)
2003-03-20 16:42:39 +00:00
Jeremy Allison
c8eed69be0 lib/messages.c: Check return from chainlock before modifying message queue.
Apply the job returned limit across all requests for job queues.
Jeremy.
(This used to be commit dee1326a1d)
2003-03-20 00:51:41 +00:00
Tim Potter
2f13a74671 Cleanup bogus initialisation in SID_NAME_USE enum.
Added new sid type = 9 for "computer" from MSDN.
(This used to be commit 45929d1269)
2003-03-20 00:32:44 +00:00
Jim McDonough
e542eedd18 use strnlen to prevent coredumps
(This used to be commit 1960a650c1)
2003-03-19 20:50:43 +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 af7bfee0c6)
2003-03-19 18:45:19 +00:00
Martin Pool
743d429d9b Step one of optimizations for StrCaseCmp:
First of all, do a char-by-char walk through both buffers until we get
to a non-ascii character, or a difference between the strings.  This
prefix can be directly compared without needing to call into iconv.
This should be much faster for strings that are either all ascii, or
differ near the start.
(This used to be commit f7f692b2db)
2003-03-18 07:31:49 +00:00
Martin Pool
a084f06fe3 Split "clobber" function and variables into its own file before it
grows too much larger.
(This used to be commit 4bbddbfc6a)
2003-03-18 07:09:23 +00:00
Martin Pool
556fea4e1e Update comment: Valgrind 1.9.4 seems to always respect client
requests, without needing --client-perms=yes.
(This used to be commit 412a8780c3)
2003-03-18 05:30:15 +00:00
Martin Pool
eb83748940 global_globber_region_function/line ought to be recorded before
clobbering the region, just in case clobbering causes us to crash
immediately.  (That might happen if we just shot ourselves in the
stack and strcpy was not inlined.)

Also, in DEVELOPER mode and when Valgrind is available, mark the
clobbered region as uninitialized.  This is an even stronger
protection than clobbering with 0xf1.
(This used to be commit 5653a42ae6)
2003-03-18 05:00:02 +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 fe2bc64bc4)
2003-03-16 13:21:12 +00:00
Andrew Bartlett
f1d333ea35 Remove an unused function and fix the build.
Andrew Bartlett
(This used to be commit 67a0319d26)
2003-03-15 08:03:11 +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 31f4827acc)
2003-03-15 07:14:55 +00:00
Gerald Carter
7ae555c43c fix WinXP & Win2K3 remote_arch and check pointer in ntlmssp code before dereferencing
(This used to be commit 2487480228)
2003-03-14 23:11:19 +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 4c823e61d1)
2003-03-12 15:40:43 +00:00
Andrew Bartlett
f4a8417d6f Add const
(This used to be commit 147a0c8b13)
2003-03-12 11:00:02 +00:00
Andrew Bartlett
3b580ff000 This patch attemptes to clean up winbindd's mutex locking.
The current locking scheme in winbind is a complete mess - indeed, the
next step should be to push the locking into cli_full_connection(), but
I'll leave it for now.

This patch works on the noted behaviour that 2 parts of the connection
process need protection - and independent protection.  Tim Potter did
some work on this a little while back, verifying the second case.

The two cases are:
 - between connect() and first session setup
 - during the auth2 phase of the netlogon pipe setup.

I've removed the counter on the lock, as I fail to see what it gains us.

This patch also adds 'anonymous fallback' to our winbindd -> DC connection.

If the authenticated connection fails (wbinfo -A specifed) - say that
account isn't trusted by a trusted DC - then we try an anonymous.

Both tpot and mbp like the patch.

Andrew Bartlett
(This used to be commit 0620320002)
2003-03-11 11:28:59 +00:00
Martin Pool
2e01ef5957 Remove valgrind_strlen function, hopefully no longer needed with
recent Valgrind relases and clashing with -DVALGRIND.
(This used to be commit 98479f1315)
2003-03-11 07:25:48 +00:00
Martin Pool
de6b39d898 Clobber strings with 0xf1f1f1f1 before writing to them to check buffer
lengths are correct.  Attempts to pstrcpy into an fstring or allocated
string should fail in developer builds.

This builds on abartlet's earlier overflow probe for safe_strcpy, but
by clobbering the whole string with a nonzero value is more likely to
find overflows on the stack.

This is only used in -DDEVELOPER mode.

Reviewed by abartlet, tpot.
(This used to be commit 8d915e266c)
2003-03-10 01:10:45 +00:00
Andrew Bartlett
8ccff3e995 This is C, not C++
(This used to be commit 25d210b90b)
2003-03-08 23:39:44 +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 afe5a3832f)
2003-03-08 10:22:50 +00:00
Simo Sorce
8a751c019c Some progress towards gums and tdbsam2
genparser works fine, and it is a marvelous tool to store objects in tdb :)
(This used to be commit 4c6d461a85)
2003-03-07 18:26:24 +00:00
Jeremy Allison
f434f039e6 dlsym takes a const char *.
Jeremy.
(This used to be commit ff3827a62b)
2003-03-03 19:53:04 +00:00
Martin Pool
e443560789 Doxygen janitor: add note that strequal is in fact case-insensitive.
(This used to be commit a4b9c5c257)
2003-02-28 05:34:19 +00:00
Martin Pool
481b4e6d6c Doxygen janitor
(This used to be commit 9af0717315)
2003-02-28 04:21:55 +00:00
Martin Pool
f5f59e866e Doxygen janitor: fix parameter names, grammar, tag names.
(This used to be commit 42d9ec28cd)
2003-02-28 04:17:30 +00:00
Martin Pool
921e569ed5 Add a comment about the meaning of samba's internal character set and
how this interacts with it.
(This used to be commit eb876ee9cf)
2003-02-28 03:51:25 +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 96570699d1)
2003-02-27 21:21:02 +00:00
Martin Pool
5c82d3f00a Doxygen janitor
(This used to be commit 67bf36c69d)
2003-02-27 05:53:25 +00:00
Jelmer Vernooij
d21b15ff57 - Rename 'modules = ' to 'preload modules = '
- Add smb_probe_module()
- Add init_modules()
- Call these functions
(This used to be commit f8f2165322)
2003-02-27 01:54:41 +00:00
Martin Pool
f7bb698298 init_valid_table: Fix a memory leak that would lose the
dynamically-created valid table every time the configuration was
reloaded.
(This used to be commit e42b237d98)
2003-02-26 06:19:16 +00:00
Andrew Bartlett
426cd68f74 Move off-by-one buggy malloc()/safe_strcpy() combination to strdup() instead.
Andrew Bartlett
(This used to be commit c26881633d)
2003-02-24 11:23:15 +00:00
Martin Pool
5b5453e6c7 Merge documentation from 3_0.
(This used to be commit 5002555a97)
2003-02-24 04:42:24 +00:00
Andrew Bartlett
ded88da1ea Add const
(This used to be commit ffaa608be0)
2003-02-24 02:11:32 +00:00