1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

63 Commits

Author SHA1 Message Date
James Peach
44f5211c17 r22418: Support running under launchd. We abstract the method of obtaining
sockets to listen on a little, because in the launchd case these
are provided for us. We also add an idle timeout so that a daemon
can exit after a period of inactivity.
(This used to be commit fc8589a337)
2007-10-10 12:19:33 -05:00
Jeremy Allison
74a07edb50 r22266: Fix bug #4512 - we were returning a volume label greater than
32 unicode chars. Windows XP doesn't like that :-).
Jeremy
(This used to be commit e59b5276b5)
2007-10-10 12:19:23 -05:00
Stefan Metzmacher
bc2b6436d0 r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users

metze
(This used to be commit 3a28443079)
2007-10-10 12:19:00 -05:00
Stefan Metzmacher
b9461058d5 r22008: use string_term_tdb_data()
metze
(This used to be commit 1f047d7e31)
2007-10-10 12:19:00 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Gerald Carter
5f67f01258 r4019: better error logging in register_message_flags() from Rob
(This used to be commit 5fc0f838e7)
2007-10-10 10:53:28 -05:00
Gerald Carter
1842fde7d1 r1885: tighten the cache consistency with the ntprinters.tdb entry an the in memory cache associated with open printer handles; also make sure that register_messages_flags() doesn't overwrite the originally registers flags
(This used to be commit 540daf71d8)
2007-10-10 10:52:23 -05:00
Gerald Carter
386a11f49e r1011: fix bad merge (from a few months ago) and ensure that we always use tdb_open_log() instead of tdb_open_ex()
(This used to be commit e65564ab4a)
2007-10-10 10:51:53 -05:00
Gerald Carter
df6d2db4ce merge from old APP_HEAD
* remove corrupt tdb and shutdown (only for printing tdbs, connections,
  sessionid & locking)
* decrement smbd counter in connections.tdb in smb_panic()
* various Makefile hack to get things to link

'max smbd processes' looks like it might be broken.  The counter KEY is not
being set.  Will look into that tomorrow.
(This used to be commit 6e22c5da92)
2004-02-12 05:24:02 +00:00
Jeremy Allison
0899066fd6 Got us happy running under valgrind again :-).
Jeremy.
(This used to be commit b6ab9d7361)
2003-05-31 02:03:58 +00:00
Jeremy Allison
1fdbe30685 Fixes to stop valgrind complaining about uninitialised memory when it's
copying clobbered buffer areas and doing hashes on them and sending
them onto the wire.
Jeremy.
(This used to be commit 7dfcf714ae)
2003-05-31 01:48:59 +00:00
Tim Potter
bdb7a74419 Whitespace syncup.
(This used to be commit 8fe5bab565)
2003-04-14 03:48:26 +00:00
Andrew Bartlett
1f499a79f5 (merge from HEAD)
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.

 - connection.c - use safe_strcpy()
Andrew Bartlett
(This used to be commit c91e76bddb)
2003-03-22 13:47:42 +00:00
Andrew Bartlett
634c54310c Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
(This used to be commit 3a7458f947)
2003-01-03 08:28:12 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00
Jelmer Vernooij
127e77e6e3 Sync 3.0 branch with head
(This used to be commit 42615b945e)
2002-08-17 15:27:10 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Jeremy Allison
9e007457e4 Removed MAXSTATUS which was set incorrectly - thus causing tdb traversal
of the connections db on smbd startup. This should fix the Solaris large
load bug.... (fingers crossed).
Jeremy.
(This used to be commit 5b2b9c25af)
2002-01-14 19:34:28 +00:00
Jeremy Allison
7acc2b977c Fix for connectinos.tdb error message from "Richard Bollinger" <rabollinger@home.com>
Jeremy.
(This used to be commit f1f1a14598)
2001-10-16 08:39:43 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Jeremy Allison
79a9902d39 Removed unneeded variable, added comment on deadlock prevention.
Jeremy.
(This used to be commit 3f52632ac9)
2001-09-19 07:06:34 +00:00
Andrew Tridgell
01bb01b3ca removed anti-race code that could cause a classic ABBA deadlock
I'd rather get the connection count wrong with a small probability
than deadlock
(This used to be commit d4e4e81328)
2001-09-19 06:46:35 +00:00
Andrew Tridgell
9a9ac2739b got rid of USE_TDB_MMAP_FLAG as its not needed any more
(This used to be commit c26e0d3f27)
2001-09-06 22:08:19 +00:00
Jeremy Allison
996719cce2 Added "use mmap" for HPUX.
Jeremy.
(This used to be commit 840802f106)
2001-07-30 22:21:31 +00:00
Jeremy Allison
54068ae8f3 Tidied up calling yield_connection on connection allocation fail.
Restore debug message to level zero.
Jeremy.
(This used to be commit 0b13f495b3)
2001-07-17 22:04:46 +00:00
Jeremy Allison
c2aa4b762f Connection record not existing is not a debug level 0.
Jeremy.
(This used to be commit d7da59f54e)
2001-07-17 21:32:33 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Jeremy Allison
a72b714822 Log tdb failures.
Jeremy.
(This used to be commit f004471aac)
2001-06-08 20:26:46 +00:00
Andrew Tridgell
5237500c73 use the new tdb_open_log() fn on connections database
(This used to be commit 68c0dcec3d)
2001-05-30 06:08:23 +00:00
Jeremy Allison
b065de612c Added tdb_errstr() messages so we can see if these functions fail.
Jeremy.
(This used to be commit ec64ddac5f)
2001-05-23 21:33:43 +00:00
Jeremy Allison
8c4d6548a9 groupdb/mapping.c: Fix gcc compiler warning.
smbd/connection.c: Sync up with code in 2.2
Jeremy.
(This used to be commit 87025c223d)
2001-05-17 00:24:34 +00:00
Jeremy Allison
10211f53f9 Check sizes of data entries in connections.tdb before deciding they're crecs...
We will need this when we use finer grained locking for max connections.
Jeremy.
(This used to be commit c6cd42a679)
2001-05-15 18:12:02 +00:00
Andrew Tridgell
8410ef028a make the max_connections code less horrendously inefficient
- it didn't honour the clear flag
- it locked the database (not necessary)

the previous code would do 10^6 kill() operations for 1000 people
logging in - and all with the database locked. Not very scalable.

Still haven't added the counter, that would make it really efficient
(This used to be commit 6bdbeb4a32)
2001-05-15 00:53:15 +00:00
Jeremy Allison
de6b5d8fb2 tdb_traverse returns number of records, not zero, on success.
Now tested max connections and it works again. Hurrah !
Jeremy.
(This used to be commit 6565b8c978)
2001-05-14 18:43:49 +00:00
Jeremy Allison
363e378dee Implemented max connections in a similar way to 2.0.x (scan of connection db).
This needs testing !
Tidied up tabs in tdb.c.
Jeremy.
(This used to be commit 0852465053)
2001-05-14 06:15:46 +00:00
Andrew Tridgell
9ce5a03ccb merge from 2.2
(This used to be commit f52a5014ee)
2001-04-18 16:41:04 +00:00
Jeremy Allison
f9a15ce1a6 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
(This used to be commit 94747b4639)
2001-04-08 20:22:39 +00:00
David O'Neill
3380ffae9c Changes from APPLIANCE_HEAD:
testsuite/printing/psec.c
        - Use lock directory from smb.conf parameter when peeking at the
          ntdrivers.tdb file.
    source/rpc_parse/parse_sec.c
        - fix typo in debug message
    source/script/installbin.sh
        - create private directory as part of 'make install'.
    source/nsswitch/winbindd_cache.c
    source/nsswitch/winbindd_idmap.c
    source/passdb/secrets.c
    source/smbd/connection.c
        - always convert tdb key to unix code-page when generating.
    source/printing/nt_printing.c
        - always convert tdb key to unix code-page when generating.
        - don't prepend path to a filename that is NULL in
          add_a_printer_driver_3().
    source/rpc_server/srv_spoolss_nt.c
        - always convert tdb key to unix code-page when generating.
        - don't prepend server name to a path/filename that is NULL in the
          fill_printer_driver_info functions.
    source/printing/printing.c
        - always convert tdb key to unix code-page when generating.
        - move access check for print_queue_purge() outside of job delete
          loop.
    source/smbd/unix_acls.c
        - fix for setting ACLs (this got missed earlier)
    source/lib/messages.c
        - trivial sync with appliance_head
(This used to be commit 376601d17d)
2001-01-11 20:41:19 +00:00
Jeremy Allison
e76fe221b8 Patch from Richard Bollinger for dead entries being left in connections tdb.
Jeremy.
(This used to be commit 48a3afcd47)
2001-01-08 21:19:15 +00:00
Jeremy Allison
369f5fd1d7 Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. Merged
in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open
problem.
Jeremy.
(This used to be commit 0a40bc83e1)
2000-12-15 01:02:11 +00:00
Andrew Tridgell
0de5569304 fixed the problem with messages not getting through
the problem had nothing to do with being your own pid, it was instead
a problem with IPC$ connections not being registered in the
connections database and an incorrect test for -1 in the messaging
code.

These changes also mean that IPC$ shares now show up in
smbstatus. That is probably a good thing.
(This used to be commit 3575ad1098)
2000-11-17 03:15:18 +00:00
Jeremy Allison
1cb444057a David Lee's utmp patch (finally). Thanks David !
Jeremy.
(This used to be commit b809a2d0c8)
2000-10-28 19:38:39 +00:00
Andrew Tridgell
15c1b7663d patch from Dominik Kubla <dominik.kubla@uni-mainz.de>
(This used to be commit 9c598e571d)
2000-05-10 11:08:08 +00:00
Jeremy Allison
693ffb8466 Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid.
Jeremy.
(This used to be commit 148628b616)
2000-05-02 02:23:41 +00:00
Andrew Tridgell
2fa922611b finally got sick of the "extern int Client" code and the stupid
assumption that we have one socket everywhere

while doing so I discovered a few bugs!

1) the clientgen session retarget code if used from smbd or nmbd would
cause a crash as it called close_sockets() which closed our main
socket! fixed by removing close_sockets() completely - it is unnecessary

2) the caching in client_addr() and client_name() was bogus - it could
easily get fooled and give the wrong result. fixed.

3) the retarget could could recurse, allowing an easy denial of
service attack on nmbd. fixed.
(This used to be commit 5937ab14d2)
2000-04-11 13:55:53 +00:00
Andrew Tridgell
f4274fe897 utmp compile fix from peter@cadcamlab.org
(This used to be commit c0562a02c3)
2000-04-10 02:44:06 +00:00
Jeremy Allison
614929752e rpc_parse/parse_spoolss.c: Added checks on mallocs/overflow checks on all prs_xx
calls.
smbd/connection.c: Fix from David Lee <T.D.Lee@durham.ac.uk>.
Jeremy.
(This used to be commit 53721fbc7d)
2000-03-25 01:37:08 +00:00
Jeremy Allison
8f1620125d acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.
include/byteorder.h: Added alignment macros.
include/nameserv.h: Added defines for msg_type field options - from rfc1002.
lib/time.c: Typo fix.
lib/util_unistr.c: Updates from UNICODE branch.
printing/nt_printing.c: bzero -> memset.
smbd/connection.c: Added check for UT_SYSLEN for utmp code.

Other fixes : Rollback of unapproved commit from Luke.
Please *ask* next time before doing large changes to HEAD.

Jeremy.
(This used to be commit f02999dbf7)
2000-03-22 19:03:12 +00:00
Jeremy Allison
1e2f92af55 Added utmp fix from David Lee <T.D.Lee@durham.ac.uk>.
Jeremy.
(This used to be commit 95d37a1d25)
2000-01-12 03:09:17 +00:00