1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

63 Commits

Author SHA1 Message Date
Jeremy Allison
8d7c886671 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
(This used to be commit d720867a788c735e56d53d63265255830ec21208)
2007-10-10 11:05:02 -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 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10 11:04:48 -05:00
Gerald Carter
f24d88cf9d r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1
(This used to be commit 9727d05241574042dd3aa8844ae5c701d22e2da1)
2007-10-10 10:57:02 -05:00
Derrell Lipman
9840db418b r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
(This used to be commit 994694f7f26da5099f071e1381271a70407f33bb)
2007-10-10 10:56:24 -05:00
Derrell Lipman
934d41d239 r6127: Eliminated all compiler warnings pertaining to mismatched "qualifiers". The
whole of samba comiles warning-free with the default compiler flags.

Temporarily defined -Wall to locate other potential problems.  Found an
unused static function (#ifdefed out rather than deleted, in case it's
needed for something in progress).

There are also a number of uses of undeclared functions, mostly krb5_*.
Files with these problems need to have appropriate header files included,
but they are not fixed in this update.

oplock_linux.c.c has undefined functions capget() and capset(), which need
to have "#undef _POSIX_SOURCE" specified before including <sys/capability.h>,
but that could potentially have other side effects, so that remains uncorrected
as well.

The flag -Wall should be added permanently to CFLAGS, and all warnings then
generated should be eliminated.
(This used to be commit 5b19ede88ed80318e392f8017f4573fbb2ecbe0f)
2007-10-10 10:56:24 -05:00
Volker Lendecke
5ba3fb825b r5767: Get rid of some compiler warnings
(This used to be commit 66471de977a56cbe58921f61da28cc7dcbc6e93e)
2007-10-10 10:56:00 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10 10:53:32 -05:00
Jeremy Allison
f98af01f43 r2032: If you're selecting a hash algorithm for tdb, you need to do it at open time,
it doesn't make sense anywhere else.
Jeremy.
(This used to be commit d7ea1ea8fb3420ca1ad8d95acdc43313898200ff)
2007-10-10 10:52:29 -05:00
Rafal Szczesniak
c0b23c6c8c Added copyrights I forgot about looong ago...
rafal
(This used to be commit 33d1e2dd63e3dbf592a666ae48bc013a8198d008)
2004-02-27 22:15:38 +00:00
Jeremy Allison
8eec62ebfb Fix the "too many fcntl locks" scalability problem raised by tridge.
I've now tested this in daemon mode and also on xinetd and I'm pretty
sure it's working.
Jeremy.
(This used to be commit 14dee038019b11300466b148c53515fc76e5e870)
2004-02-19 01:55:24 +00:00
Gerald Carter
88c95aa735 fix some warnings found by the Sun C compiler
(This used to be commit e1fac713e25692a5790c3261ba323732930f5249)
2003-09-22 17:53:59 +00:00
Gerald Carter
c674e411c7 i guess i'm the only one this ever annyoed...
fix the confusion when we tdb_lock_bystring() but
we retrieve an entry using tdb_fetch_by_string.
It's now always tdb.*bystring()
(This used to be commit 66359531b89368939f0e8f584a45844b5f2f99e7)
2003-07-10 20:37:01 +00:00
Volker Lendecke
f13e48e2ee Different fix for memleak just committed. This belongs into
tdb_search_list_free.

Volker
(This used to be commit 0f3822c8e71426983b960ad49511efa8707159f9)
2003-07-01 13:04:50 +00:00
Tim Potter
402fbc518a spelling
(This used to be commit 865c11275685c85124b506c9bbd2a8bde2e760b9)
2003-05-14 00:46:43 +00:00
Andrew Bartlett
4f0381bb96 Start merging mimir's trusted domain code from HEAD to 3.0. (for HEAD trusting
NT).
(This used to be commit 76cd4a8901a8ac1c3691bc89e496bbb493e5c234)
2003-04-22 12:13:13 +00:00
Jeremy Allison
2962bec1ab Fix from Andrew Esh to ensure tdb_pack can't segfault.
Jeremy.
(This used to be commit 9783929d4ed51e63bddde4b890caa01b737abe85)
2003-04-10 19:08:45 +00:00
Jeremy Allison
bbf9f09ee5 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 07efebb98473cb3d4adc6b2e0afef3f06dcc99b8)
2003-01-30 23:55:58 +00:00
Gerald Carter
99cdb46208 *lots of small merges form HEAD
*sync up configure.in
*don't build torture tools in make all
*make sure to remove torture tools as part of make clean
(This used to be commit 0fb724b3216eeeb97e61ff12755ca3a31bcad6ef)
2003-01-15 18:57:41 +00:00
Andrew Bartlett
f9c61aef05 Merge from HEAD:
Keep all the const warnings in one place, by adding a utility function to
make the TDB_DATA.
(This used to be commit 7d52f011e7191f54004341a646b049d373504c02)
2003-01-14 10:39:32 +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 3a7458f9472432ef12c43008414925fd1ce8ea0c)
2003-01-03 08:28:12 +00:00
Jeremy Allison
de474974ea Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
(This used to be commit 5d5762d1787db4392d2dff16024097c638b2d494)
2002-11-23 02:52:36 +00:00
Jeremy Allison
0c2f84dfd0 Add chainlock_read functions to get a read lock. Used in *massively*
contended tdb's (and I've got one :-).
Jeremy.
(This used to be commit d4b795e6a451d9abaa4a928cf5d34e12b2babc2d)
2002-11-09 03:36:47 +00:00
Jeremy Allison
9304248788 Merge of scalable printing code fix... Needs testing.
Jeremy.
(This used to be commit d030df76439c72825d68410211e62090438cef54)
2002-11-07 02:15:35 +00:00
Jeremy Allison
3665777a5b Add a timeout to tdb_lock_bystring(). Ensure we never have more than
MAX_PRINT_JOBS in a queue.
Jeremy.
(This used to be commit 9fe3c0b90d4bff2217e3cb5a34b4683ca314c06e)
2002-10-04 22:53:18 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-07-15 10:35:28 +00:00
Tim Potter
45d3315e32 When printing a tdb log message display "unnamed" instead of "unknown" if
the tdb has not been named.
(This used to be commit 3e7985c60ee9888285769f1eb0ec81f764c26d91)
2002-04-09 23:03:17 +00:00
Simo Sorce
68518222a7 uint32 store and fectch functions, a signed int is not enough sometimes
(This used to be commit f07b2b3d5295202e0c8e530c43fae6d458b2cf2a)
2002-04-07 22:04:39 +00:00
Jeremy Allison
67d21b5a4b Make winbindd_idmap tdb endian independent. This is very important for
sharing between machines with rsync.
Finally removed tdb_store_int/tdb_fetch_int.
Now only tdb_store_int32/tdb_fetch_int32 which are endian independent
are allowed.
Jeremy.
(This used to be commit 1c4a00dcc13f4a7c5876a5cf63ca730190d1132e)
2002-03-21 23:39:17 +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 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-30 06:08:46 +00:00
Tim Potter
5916634a3a Display tdb name of "unknown" in logging debug when tdb has not been named.
(This used to be commit 96c36e51ee4df4c46e5e9e611844dfa83260f606)
2002-01-22 00:36:53 +00:00
Andrew Bartlett
1a74d8d1f0 This is another *BIG* change...
Samba now features a pluggable passdb interface, along the same lines as the
one in use in the auth subsystem.  In this case, only one backend may be active
at a time by the 'normal' interface, and only one backend per passdb_context is
permitted outside that.

This pluggable interface is designed to allow any number of passdb backends to
be compiled in, with the selection at runtime.  The 'passdb backend' paramater
has been created (and documented!) to support this.

As such, configure has been modfied to allow (for example) --with-ldap and the
old smbpasswd to be selected at the same time.

This patch also introduces two new backends:  smbpasswd_nua and tdbsam_nua.
These two backends accept 'non unix accounts', where the user does *not* exist
in /etc/passwd.  These accounts' don't have UIDs in the unix sense, but to
avoid conflicts in the algroitmic mapping of RIDs, they use the values
specified in the 'non unix account range' paramter - in the same way as the
winbind ranges are specifed.

While I was at it, I cleaned up some of the code in pdb_tdb (code copied
directly from smbpasswd and not really considered properly).  Most of this was
to do with % macro expansion on stored data.  It isn't easy to get the macros
into the tdb, and the first password change will 'expand' them.  tdbsam needs
to use a similar system to pdb_ldap in this regard.

This patch only makes minor adjustments to pdb_nisplus and pdb_ldap, becouse I
don't have the test facilities for these.  I plan to incoroprate at least
pdb_ldap into this scheme after consultation with Jerry.

Each (converted) passdb module now no longer has any 'static' variables, and
only exports 1 init function outside its .c file.

The non-unix-account support in this patch has been proven!  It is now possible
to join a win2k machine to a Samba PDC without an account in /etc/passwd!

Other changes:

Minor interface adjustments:
pdb_delete_sam_account() now takes a SAM_ACCOUNT, not a char*.

pdb_update_sam_account() no longer takes the 'override' argument that was being
ignored so often (every other passdb backend).  Extra checks have been added in
some places.

Minor code changes:
smbpasswd no longer attempts to initialise the passdb at startup, this is
now done on first use.

pdbedit has lost some of its 'machine account' logic, as this behaviour is now
controlled by the passdb subsystem directly.

The samr subsystem no longer calls 'local password change', but does the pdb
interactions directly.  This allow the ACB_ flags specifed to be transferred
direct to the backend, without interference.

Doco:

I've updated the doco to reflect some of the changes, and removed some paramters
no longer applicable to HEAD.
(This used to be commit ff354c99c585068af6dc1ff35a1f109a806b326b)
2002-01-20 14:30:58 +00:00
Jeremy Allison
3a851587f8 Ensure we log tdb open fails. Patch from Alexander Bokovoy <a.bokovoy@sam-solutions.net>
Jeremy.
(This used to be commit eb99e7f29c2d6041054331425cb245da86bedaa4)
2002-01-18 02:15:04 +00:00
Jeremy Allison
af85c2f062 Added int32 version of "atomic" update.
Jeremy.
(This used to be commit 1233b553e78b8d7580b9ea4f1bba62c78b4cd186)
2002-01-09 01:53:19 +00:00
Jeremy Allison
b6f4f3465f Added int32 versions of the endian-dependent code.
Jeremy.
(This used to be commit d57fb9a8c25a95e434cb5fb3d63a87d98abeefef)
2002-01-09 01:32:17 +00:00
Jeremy Allison
eca99f5c22 Fixed nasty cast of tdb_delete in traversals.
Jeremy.
(This used to be commit a0cdec3acc82d1ce0292fadd4b8dac23638450f3)
2002-01-03 22:48:48 +00:00
Jean-François Micouleau
791788ea9d changed the DEBUG level of tdb_pack and tdb_unpack. Instead of 8, it's now
18.

when you're looking at a level 10, and it's all clutered with
tdb_pack/unpack, it's getting .... And anyway most of our code using
tdb_pack/unpack have DEBUG around the call if there is a problem.

	J.F.
(This used to be commit 7e20fad5ed00be4594bfc45603db89d600f46c55)
2001-12-05 15:45:36 +00:00
Jeremy Allison
20fdf28178 Tidup.
Jeremy.
(This used to be commit 837f2b961b1e7dcd6998f36d58d2059290e89e18)
2001-12-04 18:37:14 +00:00
Martin Pool
84503c81f0 undo
(This used to be commit fc176f15f27686049453552219b56b9de33ceffa)
2001-12-04 11:41:12 +00:00
Martin Pool
7d9e09f527 Better error handling:
- tdb_open api changed so that you now pass an error handling
   callback when opening the file, so that errors detected during
   opening have somewhere to go.  (All calls from the body of Samba to
   this function go through a wrapper in tdbutil, which has been
   updated.)

 - Clean up logic for deciding how to open tdb.  Emit log messages if
   something goes wrong (e.g. bad magic.)

 - tdbtool now logs errors to stderr.
(This used to be commit 0aa800618eab1043d802c04fb1d125cd07936769)
2001-12-04 07:40:25 +00:00
Andrew Tridgell
1772584c35 actually obey the "use mmap" smb.conf option
(This used to be commit b36c98036bcbaa5545c9637cb632361122033cfd)
2001-09-06 05:45:07 +00:00
Andrew Tridgell
ad7c3ea0f0 merged fix for tdb_unpack from 2_2
(This used to be commit 200b682e9bbe79897343422f7c870382ed6de40a)
2001-05-30 06:23:05 +00:00
Andrew Tridgell
9848c067c0 - fixed an off-by-1 bug in the delayed deletion code that I believe
was the initial cause of the connections database becoming corrupt.
  Note that this bug only happens when doing deletions within a
  traversal, which is why it has only showed up now
- added delete within traversal testing to tdbtorture
- added a lot more logging to tdb
(This used to be commit 6e1277df9d964c615a3ad876d3b89ff8132081c1)
2001-05-30 05:40:52 +00:00
Andrew Tridgell
964d7a6625 added a tdb_open_log() function that opens a tdb and enables logging
of messages from the tdb code into the Samba DEBUG() system
just call tdb_open_log() instead of tdb_open() to enable this on
any tdb
(This used to be commit 3ab770484c6775df2c1a6f69427ebe656702c96c)
2001-05-30 03:42:44 +00:00
Jeremy Allison
15e66ba37a Added tdb_change_int_atomic() to allow atomic updates of a tdb int value.
Jeremy.
(This used to be commit cf5015f15935605cf69078bc15251db61ddc48c7)
2001-05-25 00:48:28 +00:00
Andrew Tridgell
906a512e0b merge from 2.2
(This used to be commit 13bf966cb8ed8df6b02018dceff94c275def8200)
2001-05-06 01:28:17 +00:00
Andrew Tridgell
9ce5a03ccb merge from 2.2
(This used to be commit f52a5014ee325f9d91f266f88eac51b6136a75b9)
2001-04-18 16:41:04 +00:00
Tim Potter
af08cd21eb Getting medieval with compiler warnings as Jeremy puts it.
(This used to be commit d05c3cf0f47a3c863adbed7ad4ab8f3248cd072d)
2001-04-16 02:35:35 +00:00
Jeremy Allison
2ef68c7e92 Merge of Andrew's changes in 2.2.
Jeremy.
(This used to be commit fc76681812b1469208ad6c8847afdfc68bc6db49)
2001-04-13 19:12:06 +00:00
Tim Potter
b541683e44 Fixed some compiler warnings.
(This used to be commit cda0f211b0dd41ae72ef3d65b9476c11c6f72de3)
2001-04-11 01:50:12 +00:00
Jeremy Allison
9c9ce2f613 Added HAVE_STDARG_H to tdbutil.c
Jeremy.
(This used to be commit e404e001990409eacf2e620d2269c2b162fa938b)
2001-04-10 21:07:04 +00:00