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

237 Commits

Author SHA1 Message Date
Jeremy Allison
16015c07ea Added Shirish's client side caching policy change.
Jeremy.
-
Tim Potter
3e7985c60e When printing a tdb log message display "unnamed" instead of "unknown" if
the tdb has not been named.
-
Simo Sorce
f07b2b3d52 uint32 store and fectch functions, a signed int is not enough sometimes -
Simo Sorce
af0fa4cf7c better check of called function's return
tdbtorture say it's ok
-
Jeremy Allison
1c4a00dcc1 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.
-
Andrew Tridgell
6edb5bea5f a bit more portability for tdbbackup -
Andrew Tridgell
9cc1dadfb0 make tdbbackup more portable -
Andrew Tridgell
73b3487daf prevent bogus compiler complaints about comments in comments -
Andrew Tridgell
4ac4220e2f added a bunch of explanation about tdbbackup -
Andrew Tridgell
18e81a4a5b don't use -pg by default when building standalone -
Andrew Tridgell
1438cd8e50 added -v and -s options
-v is used for verify/restore from backup
-
Andrew Tridgell
f619330082 added a tdb backup utility
when complete, this will be used to backup critical tdbs at samba
startup and possibly periodically while Samba is running so that if
tdb corruption is caused by a power failure Samba can restore from the
backup.
-
Andrew Bartlett
3bf4b42771 Various comment fixes from Rafal Szczesniak <mimir@diament.ists.pwr.wroc.pl> -
Jeremy Allison
9dae1398b4 Memory leak on error condition fixed by Kian Win <codegrunt@rubbercookie.com>.
Jeremy.
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Tim Potter
5fb3be6291 Raise log level of warning produced when the open() of the tdb fails.
Sometimes an open error is OK.
-
Tim Potter
96c36e51ee Display tdb name of "unknown" in logging debug when tdb has not been named. -
Andrew Bartlett
ff354c99c5 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.
-
Jeremy Allison
eb99e7f29c Ensure we log tdb open fails. Patch from Alexander Bokovoy <a.bokovoy@sam-solutions.net>
Jeremy.
-
Jeremy Allison
4f703b84cd Move SAFE_FREE into tdb.c to stop exporting it into tdb.h namespace.
Jeremy.
-
Jeremy Allison
1233b553e7 Added int32 version of "atomic" update.
Jeremy.
-
Jeremy Allison
d57fb9a8c2 Added int32 versions of the endian-dependent code.
Jeremy.
-
Jeremy Allison
a0cdec3acc Fixed nasty cast of tdb_delete in traversals.
Jeremy.
-
Jeremy Allison
eb66074665 debug statement fixups.
Merge SAFE_FREE fix in tdb from 2.2, and IRIX fix.
Jeremy.
-
Andrew Tridgell
65e857b36e more irix -64 portability fixes -
Martin Pool
79feca4d25 Ignore torture.tdb -
Andrew Tridgell
412e79c448 net ads password and net ads chostpass commands from Remus Koos -
Jeremy Allison
1d2504b5c7 Must check against -1 for fcntl error check.
Jeremy
-
Herb Lewis
fe0db4c55f add *.po32 to ignore list -
Jeremy Allison
9e3581827d Fix up warnings. Make tdb_openXX() names const.
Jeremy.
-
Jeremy Allison
b03aaddcf3 Tidyups to remove warnings on tdb standalone code.
Jeremy.
-
Martin Pool
6c684c89a4 Doc. -
Martin Pool
caa08bb56e Allow for internal databases which may have no name. -
Martin Pool
8118676f78 Log more error messages. -
Martin Pool
b50e566ab9 Log more error messages. -
Martin Pool
a228c7efcc Allocate tdb name up front in case log functions want to use it. -
Martin Pool
b1d7d80068 tdb_open_ex: More cleanups: just dynamically allocate the TDB_CONTEXT
up front, rather than working on the stack and then copying across.
-
Martin Pool
52ef112e10 Refactor code to check whether already open into its own function. -
Martin Pool
fe901ec194 tdb_open_ex should always "goto fail" in case of error, rather than
just returning.  I don't think this would leak at the moment, but it's
an accident waiting to happen.
-
Martin Pool
bb6c0df4bc Doc. -
Martin Pool
fac685d30f tdb_open_ex: Continue previous refactoring so that we consistently
just say "tdb" not "&tdb".
-
Martin Pool
d159415049 tdb_open_ex: Refactor to use a pointer to tdb, rather than an auto
tdb, to be consistent with the rest of the code.
-
Tim Potter
d902baf709 Formatting fixup. -
Andrew Tridgell
c4f5a6c65d added a simple tdbdump utility -
Jean-François Micouleau
7e20fad5ed 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.
-
Jeremy Allison
837f2b961b Tidup.
Jeremy.
-
Martin Pool
3dbb5dfcfb Put back changes to set errno, which seem to do no harm. -
Martin Pool
58cfea3c2a Fix headers. This I know is correct. -
Martin Pool
0c22a10d73 Fix headers. This I know is correct. -
Martin Pool
fc176f15f2 undo -