1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-20 14:03:59 +03:00

1518 Commits

Author SHA1 Message Date
Andrew Bartlett
f4a8417d6f Add const
(This used to be commit 147a0c8b13d20e06c557fb817a36fddf9a920d65)
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 0620320002082298a15cbba72bd79aecfc607947)
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 98479f1315cf8968152e1566966ac57e171008c3)
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 8d915e266cd8ccc8b27e9c7ea8e9d003d05f8182)
2003-03-10 01:10:45 +00:00
Andrew Bartlett
8ccff3e995 This is C, not C++
(This used to be commit 25d210b90b6c0377046d89a1dce7a32f94fd7859)
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 afe5a3832f79131fb74461577f1db0e5e8bf4b6d)
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 4c6d461a8572f03cd33cba95500cc837638b732c)
2003-03-07 18:26:24 +00:00
Jeremy Allison
f434f039e6 dlsym takes a const char *.
Jeremy.
(This used to be commit ff3827a62b37342b13fd8b4eafd256d91428c02b)
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 a4b9c5c2576c80a5f60d47d178b9b8c50d348893)
2003-02-28 05:34:19 +00:00
Martin Pool
481b4e6d6c Doxygen janitor
(This used to be commit 9af07173152c5e861d13b33a8d4aee8167a50b66)
2003-02-28 04:21:55 +00:00
Martin Pool
f5f59e866e Doxygen janitor: fix parameter names, grammar, tag names.
(This used to be commit 42d9ec28cd55dbcfda546c84fb842938aeda544d)
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 eb876ee9cf24eda04e0856899b232d060c669c0c)
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 96570699d1b715f47c35aa211da6ec18f6fc4109)
2003-02-27 21:21:02 +00:00
Martin Pool
5c82d3f00a Doxygen janitor
(This used to be commit 67bf36c69d19463c28066b276d74ac4784b26bed)
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 f8f21653225792c0001d183c6efe8b7d89a0785d)
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 e42b237d980461caf2dd2a8f82c17bf674facb7d)
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 c26881633d8a7f6d9b9ed9c6a97ce2b45bf2b317)
2003-02-24 11:23:15 +00:00
Martin Pool
5b5453e6c7 Merge documentation from 3_0.
(This used to be commit 5002555a9719987ccdc887ffff64ea8d02c9881d)
2003-02-24 04:42:24 +00:00
Andrew Bartlett
ded88da1ea Add const
(This used to be commit ffaa608be01d72075942ca3aff2325c6364e0556)
2003-02-24 02:11:32 +00:00
Andrew Bartlett
e68684aa65 Fix 2 off-by-one bugs in the use of malloc()ed strings and safe_strcpy().
safe_strcpy() isn't particularly safe (this has been noted before) as it does
not take the size of the buffer, but instead the size of the buffer *minus 1*

The locking.c fix was causing segfaults on machines running with
--enable-developer, and was tracked down thanks to the fact that vance's build
farm machine runs with such an option, and smbtorture's DIR1 test hits this
bug very well.

(The --enable-developer code writes to the last byte of the string, to check
for incorrect use of safe_strcpy()).

Andrew Bartlett
(This used to be commit e908fd164d1b11b6f76a6fdffb22e139813cb3c0)
2003-02-24 01:13:31 +00:00
Simo Sorce
bfc5f0ba8e move genparser to use talloc contexts instead of [m|c|re]alloc() and free()s
(This used to be commit 70fce680c01fa1baa65fb3cbc83dfaf822fdadd7)
2003-02-23 17:40:43 +00:00
Andrew Bartlett
7e110f782a More signed/unsigned fixes (yes, I run with funny compiler options) and
make x_fwrite() match fwrite() in returning a size_t.

Andrew Bartlett
(This used to be commit 2943c695787b742e9a96b2eefe2d75f681bacf7c)
2003-02-22 12:22:06 +00:00
Martin Pool
1fc2976e14 Doxygen janitor
(This used to be commit 367997562998adb3f80602596c770d9ac319065b)
2003-02-21 03:05:55 +00:00
Jelmer Vernooij
8d8a8c9633 Make init_module() and thus smb_load_module() return an int.
modules/developer.c: init_module() should return an int
(This used to be commit 7f59703550378ff2333e3c851bf1a77037510abd)
2003-02-20 22:26:28 +00:00
Andrew Bartlett
1f1125577c Move to a in-memory ccache for winbind, and replace setenv() properly.
(According to the manpages, you cannot put a stack variable into putenv()).

Yes, this leaks memory.

Andrew Bartlett
(This used to be commit 50bced1e26434ecc7474964062746e2831e5f433)
2003-02-19 11:33:35 +00:00
Jim McDonough
a0913929ef base64_decode() with heimdal libs, so I've renamed it base64_decode_inplace().
(This used to be commit 8c69212eeb4a0ec144b960d76319fd4940b8c239)
2003-02-19 00:27:38 +00:00
Jeremy Allison
fb8d1412e1 Ensure we use getgrnam() unless BROKEN_GETGRNAM is defined. I now need
to set this for Tru64.
Jeremy.
(This used to be commit e7c4616c45ea5ec7c04022d6cca49ac70adde121)
2003-02-18 04:49:31 +00:00
Martin Pool
097bf66f71 Remove obsolete comment.
(This used to be commit e22465749dc7c2acd2441a897df592616fc275da)
2003-02-18 02:01:38 +00:00
Martin Pool
54a09519a4 Doxygen janitor and some doc typo fixes.
(This used to be commit 82414706e6659c1638936d9b9afdb9329109f58f)
2003-02-18 00:52:42 +00:00
Martin Pool
5a35b2138e Doxygen janitor. No other changes.
(This used to be commit fa38e7956c21b828ba208282ef0ac85c2b66ff22)
2003-02-18 00:41:13 +00:00
Martin Pool
789780275c Add comment explaining the -DDEVELOPER safe_strcpy overflow hack.
(This used to be commit 90e1d8bdfa9ec0a4f3795d9a89db1d2324447b68)
2003-02-17 23:33:55 +00:00
Andrew Bartlett
bc8c03b662 This is a very nice way to detect pstrcpy() into a malloc()ed string, but
it really is a developer hack...

Andrew Bartlett
(This used to be commit 3588ebb35b14422141d4070413185195b525038e)
2003-02-17 12:33:24 +00:00
Andrew Bartlett
cc0202884b This patch fixes one of my longest-standing pet hates with Samba :-).
When we look see if a user is in a list, and we try to 'expand' an @group, we
should lookup the user's own list of groups, rather than looking for all the
members of a group.

I'm sure this will fix some nasty performance issues, particularly on large
domains etc.  In particular, this avoids contacting winbind at all, if the
group is not a winbind group.

(This caused a deadlock on my winbind-on-PDC setup).

The groups list always includes the user's primary group, as per the
getgrouplist manpage, and my recent changes to our implementation.

Andrew Bartlett
(This used to be commit 9be21976f7662ebe6eb92fff7cecbdb352eca334)
2003-02-17 12:27:34 +00:00
Andrew Bartlett
e33551bc0c Set the length back to zero when we free the data_blob.
(This used to be commit 4560594a67056ee1a5e51a122d1b254944e7c266)
2003-02-17 12:19:12 +00:00
Andrew Bartlett
55da3690b7 Try to make our getgrouplist replacement better match the 'real' implemenations.
In particular, make sure we include the primary gid in the list.

Andrew Bartlett
(This used to be commit 0cd4b339b7eff55019caaeaa998d5e70b2eed200)
2003-02-17 12:04:09 +00:00
Jelmer Vernooij
1cf9b9be79 Remove obsolete file lib/netatalk.c - We have a VFS module now
(This used to be commit 28653989cfe5d705b99a4888c0c3fb79d1f89162)
2003-02-15 02:02:51 +00:00
Tim Potter
3b23695db6 Simplify some return values in gencache functions:
-	return ret == 0 ? True : False;
+	return ret == 0;

and

-	return tdb_close(cache) ? False : True;
+	return tdb_close(cache) != -1;
(This used to be commit 026b988b132ec76fdd3821639960658e1d36cd43)
2003-02-14 05:07:05 +00:00
Martin Pool
1f2a901d78 Add FIXME about checking exit code for popen'd commands.
Fix typo.
(This used to be commit 2b5664823e05e328c86051fb607182ad20d786d4)
2003-02-13 04:46:55 +00:00
Andrew Tridgell
c713b6aaf5 pull_ucs2_talloc() should pull to a char**, not a void**
(This used to be commit 3cf539421fa2a5c276baeedbdbf42ced29d9f1e4)
2003-02-12 00:39:36 +00:00
Andrew Bartlett
99f9caebe4 One more fix for the difference between FILE and X_FILE.
(This used to be commit 7e56014b2877cde489913310edbfd16c267d9859)
2003-02-08 01:00:55 +00:00
Andrew Bartlett
315e4f513b Ensure we don't get problems between FILE and X_FILE buffers - always use the
x_ varient of the command.

Andrew Bartlett
(This used to be commit 6a028507f0d5eadd2ec0a5b45c35e3a019a56f0b)
2003-02-07 23:39:47 +00:00
Jeremy Allison
5bff9ad142 Samba janitor: adding mbp's umask patch :-).
Jeremy.
(This used to be commit babbbd9c651e044832a78aa0fbcee5afd73770e2)
2003-02-07 21:59:42 +00:00
Andrew Tridgell
4dc434c804 make sure we don't run over the end of 'name' in unix_convert()
Thanks to Andrew Bartlett for spotting this.
(This used to be commit b4c210ccb05e71a8ddf1c25d028452dd5cd93c72)
2003-02-07 04:01:36 +00:00
Andrew Bartlett
7c1698d302 Bitmap offsets and counts are always positive.
(This used to be commit 8f495e8634a1777c4b03d3ec07c76f905ff2fb98)
2003-02-01 06:30:12 +00:00
Andrew Bartlett
c2b134cc3b Always escape ldap filter strings. Escaping code was from pam_ldap, but I'm to
blame for the realloc() stuff.

Plus a couple of minor updates to libads.

Andrew Bartlett
(This used to be commit 34b2e558a4b3cfd753339bb228a9799e27ed8170)
2003-02-01 05:20:11 +00:00
Andrew Bartlett
cf4e0982fd Make it clear that the magic value is (size_t)-1.
Andrew Bartlett
(This used to be commit 0676b4e35f2ab5b58c44df9fe2eef112425d6013)
2003-02-01 04:40:00 +00:00
Jeremy Allison
b102e79e75 Add 3 second timeout when terminating server and sending print notify
messages. Stops build-up of large numbers of smbd's waiting to terminate
on large print throughput.
Jeremy.
(This used to be commit 4ae130bfa82be60de6a6f357f65207fcb24f45fb)
2003-01-30 23:55:13 +00:00
Tim Potter
0310697963 Move debug level message handling into debug.c from messages.c
Removed duplicate message_register() for REQ_DEBUGLEVEL message.
(This used to be commit 6fee7196d695ca813a301b1e6d7da687b7e7bda5)
2003-01-30 04:00:28 +00:00
Tim Potter
ffaaa7a5af Removed duplicate fn to avoid compiler warning.
(This used to be commit 55d268fdd67e42244128dae8614d0e4aa2eb2da2)
2003-01-29 05:16:16 +00:00
Tim Potter
308efc0337 Return 0 instead of crashing when a NULL source string is passed
to rpcstr_pull()
(This used to be commit b9c4cc119588d6a564f0aaf12fd2ef867a42aeb8)
2003-01-29 02:55:39 +00:00