1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00

1495 Commits

Author SHA1 Message Date
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
Tim Potter
1394248a10 Quieten debug about gencache.tdb not being able to be opened.
Perhaps we should try to open O_RDONLY if O_RDWR fails?
(This used to be commit 1e7236371d2b766b161acbb0c950cd3bb4a6ede7)
2003-01-29 02:54:36 +00:00
Jeremy Allison
012f7aae4e Fix memory leak found my Leo Qiu <leoxqiu@yahoo.com>.
Jeremy.
(This used to be commit af6e4ea640828438fe234db1652dc4c1e10a487e)
2003-01-24 19:20:01 +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 303710c2065850beebef678e657633497e4d8452)
2003-01-23 03:02:08 +00:00
Tim Potter
aeaa901a72 Updated some comments.
(This used to be commit f150af98a77ebcfa848735b7a67bbb95bd6d5b57)
2003-01-21 06:30:11 +00:00
Tim Potter
4d3ec0020d Keep the list of dead WINS servers in gencache.tdb instead of in
memory.  This allows the information to be shared amongst all smbd
processes.

HP CR #1099
(This used to be commit 88d977ecceaec45ab6b238ddd32d92885da19793)
2003-01-21 05:05:10 +00:00
Tim Potter
4d6535dc1a Make the valstr and timeout return pointers optional so a caller can
pass NULL if it doesn't care about the gencache key.
(This used to be commit 9ff4fe7e0d95c0cea94f65c00fea21600308d7d1)
2003-01-21 05:01:05 +00:00
Jim McDonough
1793c8f143 dlsym() can return NULL validly, so we can't use that as the error test.
dlerror() is the correct way to test.
(This used to be commit 41b1be15bac271116a7096e511cc029685013e1f)
2003-01-17 21:23:14 +00:00
Jim McDonough
9eb368e068 Enable dynamic loading of RPC modules. See docs/textdocs/RPC_PLUGGIN.txt for instructions.
(This used to be commit d51e12df78ff8fc721d693fedbd1c633f39edd49)
2003-01-17 20:57:26 +00:00
Andrew Tridgell
31482b2c6b fix some undefined behaviour with increments in C. In theory a
compiler could have produced complete crap for this code.
(This used to be commit 0e90da0810b60dd1c2b1ec46c1a2993856b919d3)
2003-01-17 04:09:23 +00:00
Jeremy Allison
effbd70c21 Fixed up mutex protection around winbindd logon code. Sync with APP-HEAD.
Jeremy.
(This used to be commit 3d04872499332ef2d8e7479b924afc8fc1ac29d7)
2003-01-16 20:08:33 +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 fe50ca8f54ded2e119bde08831785fbe0db2ee99)
2003-01-16 03:29:54 +00:00
Andrew Bartlett
078468a147 Fix a signed/unsigned warning.
(This used to be commit b5ae49544d8e389595a3b076466498912de42081)
2003-01-16 02:02:23 +00:00
Andrew Bartlett
3095cbd635 Doing a malloc(strlen(s)) then a pstrpcp(y, s) is just silly, make it a strdup
instead.

Andrew Bartlett
(This used to be commit c781e34d274f4185ec932cc59029d3f9a65e47c4)
2003-01-15 12:48:06 +00:00
Andrew Bartlett
8a78a0a27a Patch from metze to add what he feels is the correct semantics for a Domain
Controller.  As we have had a number of attempts at this over the last little
while, I need to get my test rig going, and give this whole area a poke...

Meanwhile, if you want to use this, just adjust your 'auth methods' line to use
samstrict_dc...

Andrew Bartlett
(This used to be commit 18e598ec24493026008fcfe486057555b8832108)
2003-01-13 13:11:36 +00:00
Andrew Bartlett
5bd2d3f2ee Patch from metze to to make testparm show values for 'workgroup', 'netbios
name' and 'netbios scope'.  Probably has a similar effect on SWAT.

Also adds '-V' to testparm.

Andrew Bartlett
(This used to be commit 71f4d8efd36351ddb2180103c160a6d737da62b1)
2003-01-13 13:03:25 +00:00
Andrew Bartlett
20ecae9a58 Accessing data after it's been free()ed really is a no-no...
Andrew Bartlett
(This used to be commit 6e821285a4aacfc0031957b88ddbec73d7e1dc11)
2003-01-13 12:42:20 +00:00
Jeremy Allison
82b41dca9d Added new message_send_pid() code that uses tdb append to reduce locking
contention on the messaging tdb.
Jeremy.
(This used to be commit 5b8cf0810a7297f239b35c93ec50d20f1eed793b)
2003-01-11 00:17:37 +00:00
Jeremy Allison
fe6bb1e9ed First part of efficiency fixes for message sending to pid's (cutting down
the amount of time we hold tdb locks). Gulp down all messages at once rather
than reading/re-writing one at a time. NOTE: All dispatch routines *must*
be able to cope with incoming message on *odd* byte boundaries (all current
handlers do).
Jeremy.
(This used to be commit 04243e39cf4e11dd20e6035f553722a9720f00ae)
2003-01-10 20:17:06 +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 88eb9e9486bca55a38e40ae53aed35ee338a68d7)
2003-01-09 06:58:07 +00:00
Tim Potter
6e87ae0db3 Removed pointless null statement in signal handler.
(This used to be commit db24489eb4304f1fb0e47a5b6bd77ff3871b757e)
2003-01-08 04:14:12 +00:00
Gerald Carter
df4af79c78 patch to include support for daemontools from Michael Handler
(This used to be commit 4c48c475a28450ad4fd8dcc8263e841c0c39a80e)
2003-01-03 17:32:11 +00:00
Andrew Bartlett
a746483fd8 Add PRINTF_ATTRIBUTE() to a few more printf() style functions. Aids in
compiler-based argument checking.
(This used to be commit 16fe928e68623a878b125910ff83df500a29d0ce)
2003-01-02 12:54:02 +00:00
Andrew Bartlett
e030b91bf8 Call me parinoid, but I don't like the idea that we could ever have dbf point
to a closed file.  Swap the assign and the close around.

Andrew Bartlett
(This used to be commit ceb2a7984910533187d3345440c24b605306e3cb)
2003-01-02 12:53:04 +00:00