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

145 Commits

Author SHA1 Message Date
Karolin Seeger
7fdbbddf42 s3-passdb: Fix typo in debug message.
Karolin
2010-03-10 12:08:27 +01:00
Günther Deschner
184afaa04c s3-secrets: use autogenerated code for TRUSTED_DOM_PASS struct parsing from a tdb.
Guenther
2009-10-29 10:49:39 +01:00
Günther Deschner
4df8426768 s3-passdb: move open_schannel_session_store() to passdb/secrets_schannel.c.
Guenther
2009-10-28 12:37:39 +01:00
Günther Deschner
bda047afbc s3-passdb: add secrets_delete_generic().
Guenther
2009-10-28 12:37:38 +01:00
Jeremy Allison
5cc895983d Fix valgrind memory leak in bug #6814 - Fixes for problems reported by valgrind
Jeremy.
2009-10-15 16:55:40 -07:00
Günther Deschner
ebe0e64ba9 s3: use enum netr_SchannelType all over the place.
Guenther
2009-10-13 10:21:46 +02:00
Stefan Metzmacher
9801ec5f1a s3:secrets_schannel: revert to using version 1
It doesn't really matter if the entries
have invalid context in it. Older versions of samba
refuse to open the file if the version doesn't match.

If we can't parse individual records, we'll fail schannel binds,
but the clients are supposed to reestablish the netlogon secure channel
by doing ServerReqChallenge/ServerAuthenticate* again. This
will just overwrite the old record.

metze
2009-09-21 06:33:25 +02:00
Günther Deschner
360868b6e8 s3-schannel: remove remaining code that was using "struct dcinfo".
Guenther
2009-08-27 15:55:20 +02:00
Günther Deschner
b089506136 s3-schannel: upgrade old format schannel_store.tdb.
Guenther
2009-08-27 15:55:20 +02:00
Günther Deschner
a09b627ecc s3-schannel: add simple wrappers to fetch and store schannel auth info.
Guenther
2009-08-27 15:55:19 +02:00
Günther Deschner
7c972d83d2 s3-schannel: make open_schannel_session_store() public.
Guenther
2009-08-27 15:55:19 +02:00
Michael Adam
8da2f93716 s3:secrets: use transaction wrapped store in get rand seed.
Now secrets.tdb is only writen with transactions.

Michael
2009-07-29 16:26:29 +02:00
Andrew Bartlett
f28f113d8e Rework Samba3 to use new libcli/auth code (partial)
This commit is mostly to cope with the removal of SamOemHash (replaced
by arcfour_crypt()) and other collisions (such as changed function
arguments compared to Samba3).

We still provide creds_hash3 until Samba3 uses the credentials code in
netlogon server

Andrew Bartlett
2009-04-14 16:23:35 +10:00
Andrew Bartlett
3b3e21bd9b Convert Samba3 to use the common lib/util/charset API
This removes calls to push_*_allocate() and pull_*_allocate(), as well
as convert_string_allocate, as they are not in the common API

To allow transition to a common charcnv in future, provide Samba4-like
strupper functions in source3/lib/charcnv.c

(the actual implementation remains distinct, but the API is now shared)

Andrew Bartlett
2009-04-14 12:53:56 +10:00
Jelmer Vernooij
81fabeff2d Use libutil genrand. 2008-10-23 18:46:35 +02:00
Jelmer Vernooij
389cfee579 Use GUID_random. 2008-10-14 02:41:20 +02:00
Volker Lendecke
f3ba7fc0b9 Store a local schannel key in secrets.tdb 2008-10-06 09:54:16 +02:00
Andrew Tridgell
0f41961e4f first cut at adding full transactions for ctdb to samba3
(This used to be commit f91a3e0f7b)
2008-08-13 11:54:08 +02:00
Volker Lendecke
0e7d1aae2f Fix a memleak in secrets_fetch_afs_key
Coverity ID 570
(This used to be commit 0f52dc3f7e)
2008-06-07 08:51:35 +02:00
Volker Lendecke
8c98f5af6f Fix a memleak in secrets_fetch_trust_account_password_legacy
Coverity ID 571
(This used to be commit a551773e34)
2008-06-07 08:50:02 +02:00
Volker Lendecke
32452565be Fix a memleak in fetch_ldap_pw
Fix Coverity ID 572, also fix the error check for secrets_fetch failing
(This used to be commit 2663c81a78)
2008-06-07 08:48:13 +02:00
Tim Prouty
fb37f15600 Cleanup size_t return values in callers of convert_string_allocate
This patch is the second iteration of an inside-out conversion to cleanup
functions in charcnv.c returning size_t == -1 to indicate failure.
(This used to be commit 6b189dabc5)
2008-05-20 22:40:13 +02:00
Volker Lendecke
16198dc51e Convert dbwrap_trans_delete to NTSTATUS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit dead193f46)
2008-04-01 14:04:22 +02:00
Volker Lendecke
fcdfff1cc8 Convert dbwrap_trans_store to NTSTATUS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 5f4de856af)
2008-04-01 14:04:22 +02:00
Stefan Metzmacher
a5f3911d70 passdb/secrets: add secrets_db_ctx() to get the db_context
metze
(This used to be commit 986bc7e8b2)
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
4b2ce410a5 passdb/secrets: use db_open_trans()
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit b61b8ca494)
2008-03-27 18:14:57 +01:00
Stefan Metzmacher
3b0592bc15 passdb/secrets: it's enough to use traverse_read() in secrets_trusted_domains()
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 729f7b9ff3)
2008-03-27 18:14:56 +01:00
Volker Lendecke
28244425b2 Convert secrets.c to use dbwrap
(This used to be commit 9d30e5991c)
2008-03-11 17:09:19 +01:00
Volker Lendecke
1ebfc66b2c Use a separate tdb for mutexes
Another preparation to convert secrets.c to dbwrap: The dbwrap API does not
provide a sane tdb_lock_with_timeout abstraction. In the clustered case the DC
mutex is needed per-node anyway, so it is perfectly fine to use a local mutex
only.
(This used to be commit f94a63cd8f)
2008-03-10 21:08:45 +01:00
Volker Lendecke
d634ab06b3 Convert secrets_lock_trust_account_password to talloc
This is preparing the conversion of secrets.c to ctdb
(This used to be commit 1307f0130c)
2008-03-10 21:08:45 +01:00
Volker Lendecke
b175ffa702 Make use of talloc_asprintf_strupper_m in secrets.c
(This used to be commit 3ac4f935c0)
2008-03-10 09:52:08 +01:00
Volker Lendecke
2e8d375346 Avoid some pointless checks
secrets_init() makes sure that the tdb is initialized
(This used to be commit 8725dbc888)
2008-03-10 09:51:58 +01:00
Volker Lendecke
c2cd0e3c54 Use talloc_tos() in secrets_init
(This used to be commit 27065382d9)
2008-03-10 09:51:51 +01:00
Günther Deschner
7ec5bfc49f More paranoid checks for secrets_init() success.
Guenther
(This used to be commit 5e60852bae)
2008-02-09 02:05:39 +01:00
Günther Deschner
c0d33508ff Add secrets_shutdown().
Guenther
(This used to be commit dd3fbd93b6)
2008-01-07 12:48:21 +01:00
Günther Deschner
d0cd32e2c8 Add and use some keystr functions using talloc_tos() in secrets api.
Guenther
(This used to be commit 6ccbf67a0c)
2007-12-19 11:15:17 +01:00
Volker Lendecke
900288a2b8 Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec)
2007-12-15 22:09:36 +01:00
Michael Adam
fe969f9a7f Refactor the lagacy part of secrets_fetch_trust_account_password() out
into a new function secrets_fetch_trust_account_password_legacy() that
does only try to obtain the hashed version of the machine password directly
from secrets.tdb.

Michael
(This used to be commit 91da12b751)
2007-12-13 10:15:18 +01:00
Michael Adam
b99a6b0e8c Remove two unneeded functions.
secrets_store_trust_account_password() and trust_password_delete()
are the write access functions to the SECRETS/$MACHINE.ACC/domain keys
in secrets.tdb, the md4 hashed machine passwords. These are not used
any more: Current code always writes the clear text password.

Michael
(This used to be commit 4788fe3924)
2007-12-13 10:15:13 +01:00
Michael Adam
2ade25279c Fix logic and prevent segfaults in secrets trustdom tdb pack code.
New size calculation logic in tdb_trusted_dom_pass_pack()
and tdb_sid_pack() used accumulated sizes as successive offsets
to buffer pointer.

Michael
(This used to be commit 9c24713b40)
2007-12-12 09:47:41 -08:00
Michael Adam
b0469d0b69 Fix secrets_store_trusted_domain_password() after pstring removal.
Jeremy, this small "&" sign has given me a headache... :-)

Michael
(This used to be commit 7590b12a99)
2007-12-12 09:47:28 -08:00
Jeremy Allison
bcf033b38e Change tdb_unpack "P" to return a malloc'ed string rather
than expect a pstring space to put data into.
Fix the (few) callers.
Jeremy.
(This used to be commit 7722a7d2c6)
2007-12-03 14:54:06 -08:00
Jeremy Allison
66298d8080 More pstring elimination.
Jeremy.
(This used to be commit 15074de938)
2007-11-20 17:18:16 -08:00
Volker Lendecke
33d8317571 static pstring removal
(This used to be commit 5490e2d772)
2007-11-05 03:16:58 +01:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Michael Adam
85811b273d r24991: Kill all those lots of trailing whitespaces from secrets.c.
These red bars in vi really hurt my eyes... :-o

Michael
(This used to be commit 2e99e141c3)
2007-10-10 12:30:31 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
4570f1c52a r22125: Fix a warning
(This used to be commit 1c0ceb5fe2)
2007-10-10 12:19:14 -05:00