1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

1554 Commits

Author SHA1 Message Date
Günther Deschner
1f4d26c487 s3-lsa: allow to lookup BUILTIN\ in lsa_LookupNames.
Found by RPC-LSA-LOOKUPNAMES torture test.

Guenther
2009-10-20 15:28:31 +02: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
Volker Lendecke
1341d4509c s3: Fix some nonempty blank lines 2009-10-13 20:34:24 +02: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
f092d689c5 s3-pdb_ldap: Fix bug #4296: Clean up group membership while deleting a user.
Note that this only is tried with editposix=yes.

Guenther
2009-09-02 12:40:47 +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
Günther Deschner
20225d83dd s3-pdb_ldap: Make ldapsam_alias_memberships behave like the tdbsam equivalent.
This lets samr_GetAliasMembership return with NT_STATUS_OK when called with 0
sids (just what w2k3 does).

Guenther
2009-08-03 16:32:15 +02:00
Volker Lendecke
a488334bf1 Rename LOOKUP_NAME_EXPLICIT to LOOKUP_NAME_NO_NSS
It took me a bit to understand what this flag does. I hope this is
a bit clearer, at least it is to me.
2009-07-31 23:19:05 +02:00
Michael Adam
d498532389 s3:passdb: use transaction_wrapped write in tdbsam_new_rid()
Now all tdb writes in passdb use transactions.

Michael
2009-07-29 16:26:30 +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
Michael Adam
ded0ce8345 s3:dbwrap: change dbwrap_change_uint32_atomic() to return NTSTATUS not uint32_t.
Michael
2009-07-29 16:26:21 +02:00
Jeremy Allison
0259a303f4 Fix Coverity CIDs 887, 888. Don't pass NULL's to functions
that deref them.
Jeremy.
2009-07-17 21:50:33 -07:00
Günther Deschner
4b6401ab2c s3-passdb: fix wbc build warning.
Guenther
2009-07-14 23:37:36 +02:00
Volker Lendecke
d050541330 Fix bug 5886
Ok, that's a very long-standing one. I finally got around to install a recent
OpenLDAP and test the different variants of setting a NULL password etc.

Thanks all for your patience!

Volker
2009-07-14 23:16:28 +02:00
Günther Deschner
9f15ef11bd s3-account_policy: add pdb_policy_type enum.
Guenther
2009-07-14 12:12:18 +02:00
Günther Deschner
e4fca7466d s3-pdb_ads: set correct pdb field with the value from 'accountExpires' attribute.
Guenther
2009-07-13 21:56:31 +02:00
Günther Deschner
05fbe0c7f7 libds: merge the UF<->ACB flag mapping functions.
Guenther
2009-07-13 15:36:07 +02:00
Volker Lendecke
afc6f607d5 Return 0 domains from enum_trusteddoms 2009-07-10 22:01:56 +02:00
Volker Lendecke
d8556bbf13 Quieten events and tldap debug messages 2009-07-10 22:01:56 +02:00
Volker Lendecke
c624a704be Make escape_ldap_string take a talloc context 2009-07-09 22:25:29 +02:00
Volker Lendecke
a5cd278f6f pdb_ads: For cached samu entries, priv is NULL
We have to recreate the priv entry on demand. This needs fixing in
passdb... :-)
2009-07-04 12:54:23 +02:00
Volker Lendecke
bfd82e4979 Add pdb_ads_get_domain_info 2009-07-04 12:54:23 +02:00
Volker Lendecke
f6ce7e0625 pdb_ads: Use tldap_fetch_rootdse in pdb_ads_connect 2009-07-04 12:54:22 +02:00
Volker Lendecke
98fb2a18f9 pdb_ads: Fetch the domain GUID 2009-07-04 12:54:22 +02:00
Volker Lendecke
b8322ec2b2 Add pdb_get_domain_info 2009-07-04 12:54:22 +02:00
Volker Lendecke
1c778aa19a Make pdb_ads return an additional flag 2009-07-04 12:54:22 +02:00
Volker Lendecke
91a8cb851e Fix bug #6431 - local groups from 3.0 setups no longer found.
Search for groups without group suffix, group suffix is only used for new entries.
2009-06-30 11:42:15 -07:00
Günther Deschner
28ef5c3ece s3-pdb_tdb: give 'unknown_str' the proper name 'comment' and set comment in passdb.
pdb_{get,set}_comment were already existing in the API but were never used.

Guenther
2009-06-29 22:36:12 +02:00
Stefan Metzmacher
ce8159b30e s3:pdb_ads: we need to make the fd for tldap/tsocket non-blocking
metze
2009-06-29 22:18:14 +02:00
Volker Lendecke
711544d494 Turn the pdb_rid_algorithm into a capabilities call that returns flags 2009-06-28 22:13:50 +02:00
Volker Lendecke
325a58a653 Make pdb_ads survive a restart of Samba4
The search function retries once, the modifying call that hits a dead smbd
returns an error. The next try will reconnect. This was simple to implement and
provides a good compromise against Samba4 idling our connection. Most of the
modifying calls are quickly after a search (like OpenUser) anyway.
2009-06-28 15:51:02 +02:00
Michael Adam
a4bc5bfa95 s3:passdb: fix bug #6509: use gid (not uid) cache in fetch_gid_from_cache().
With the previous code, the cache can never have been hit at all.

Michael
2009-06-26 14:15:44 +02:00
Volker Lendecke
e3fb71dac8 Only set the password if there is one 2009-06-24 16:30:55 +02:00
Volker Lendecke
63a70ba0ad Prepare control support
We will have arrays of controls passed to tldap.c. Follow a mantra from the
classic book "Thinking Forth" by Leo Brodie: Favor counts over terminators :-)

This makes the parameter lists to tldap pretty long, but everyone will have
wrapper routines anyway, see for example tldap_search_fmt. And the OpenLDAP
manpages call the non-_ext routines deprecated, probably for a reason.
2009-06-20 18:54:06 +02:00
Volker Lendecke
62eb817c06 Fix setting passwords in pdb_ads
The samba4 password_hash module does not allow changing the password fields via
the "delete oldval" -> "add newval" set of modify operations, it requires a
single "replace with newval" operation.

Andrew, Samba3 by default uses that delete/add pair to detect if between
fetching the old value and storing the new one the old value has changed. This
is lost by using the "replace" operation.

Would it make sense to add this to the password_hash module?

Volker
2009-06-20 12:15:21 +02:00
Volker Lendecke
eb8c081771 talloc_tos() aborts if it can not get a stackframe 2009-06-20 12:15:21 +02:00
Volker Lendecke
6e4c57ced5 Activate tldap tracing in pdb_ads 2009-06-12 15:04:21 +02:00
Tim Prouty
ef55c2bd91 s3 passdb ads: add missing character 2009-06-11 11:01:51 -07:00
Volker Lendecke
117c19efa4 Implement pdb_enum_alias_memberships 2009-06-11 18:04:35 +02:00
Volker Lendecke
6372bd695d Implement pdb_ads_set_aliasinfo 2009-06-10 23:57:49 +02:00
Volker Lendecke
baa47dd278 pdb_default_aliasinfo is just fine for pdb_ads right now 2009-06-10 23:57:49 +02:00
Volker Lendecke
96df53fdc7 Implement pdb_ads_lookup_rids 2009-06-10 23:08:09 +02:00
Volker Lendecke
6e9e0334ff Fix a segfault in pdb_ads_delete_user()
If a user comes from the passdb cache, priv is NULL
2009-06-10 23:08:09 +02:00
Volker Lendecke
b660e51dec If there are no mods, don't bother the ldap server 2009-06-09 22:40:36 +02:00
Volker Lendecke
078443bc67 Some more fields in pdb_ads_init_ads_from_sam() 2009-06-09 22:40:36 +02:00
Volker Lendecke
9af9a43464 Do not pull samAccountName twice 2009-06-09 21:46:30 +02:00
Volker Lendecke
0302bbda35 No need to free twice -- thanks gd :-) 2009-06-09 15:28:21 +02:00
Volker Lendecke
fa074c9916 Implement pdb_ads_[add|del]_groupmem 2009-06-09 15:25:15 +02:00
Volker Lendecke
63e6bb947a Implement pdb_ads_delete_dom_group 2009-06-09 14:49:34 +02:00
Volker Lendecke
89bd09e7f3 Implement pdb_ads_enum_group_members 2009-06-08 23:59:12 +02:00
Volker Lendecke
46b5cce1e9 Fix some nonempty blank lines 2009-06-08 23:11:14 +02:00
Volker Lendecke
094f47e7cf Fix two 64-bit warnings 2009-06-08 21:14:11 +02:00
Volker Lendecke
275ca400db Implement pdb_[add|del]aliasmem 2009-06-08 21:14:10 +02:00
Volker Lendecke
af82489b41 Do not use a variable format string 2009-06-08 21:14:10 +02:00
Volker Lendecke
7ab4d3fa43 Implement pdb_ads_enum_aliasmem 2009-06-08 21:14:10 +02:00
Volker Lendecke
a51e6ce43c Pass a talloc_ctx to pdb_enum_aliasmem 2009-06-08 21:14:10 +02:00
Volker Lendecke
5ea88420da Implement pdb_ads_delete_alias 2009-06-08 21:14:10 +02:00
Volker Lendecke
66c3cd1e92 Implement pdb_ads_create_dom_group() 2009-06-08 21:14:10 +02:00
Volker Lendecke
e2611e2b12 More pdb_ads stuff 2009-06-07 23:14:40 +02:00
Volker Lendecke
14a2974092 Make "net sam list" work for groups, aliases and builtins 2009-06-07 12:32:29 +02:00
Volker Lendecke
f3b227c0d2 Return full info in pdb_ads_search_users() 2009-06-07 12:32:25 +02:00
Günther Deschner
fbb1e990ab s3-samr: fix return code of _samr_LookupRids when run with pdb_ldap.
when _samr_LookupRids is called with no rids, it needs to return
NT_STATUS_NONE_MAPPED (not NT_STATUS_NO_MEMORY).

Found by RPC-SAMR torture test.

Guenther
2009-06-07 02:24:21 +02:00
Karolin Seeger
c94d1cd7b1 s3/passdb: Fix debug message: 'net setmaxrid' does not exist.
This is aiming bug #6351.

Karolin
2009-06-06 15:11:16 +02:00
Volker Lendecke
23b501e02a Add an early prototyp of pdb_ads.c.
The purpose of this module is to connect to a locally running samba4 ldap
server for an alternative "Franky" setup. Right now it contains a couple of
gross hacks: For example it just takes the s4-chosed RID directly as uid/gid...

Checking in tldap and pdb_ads now, I think 3777 insertions are enough for a
start...
2009-06-06 13:10:30 +02:00
Volker Lendecke
14c1362034 Fix some nonempty blank lines 2009-05-31 12:16:34 +02:00
Günther Deschner
10eec5ebc0 s3-passdb: fix uninitialized variable in local_password_change().
Guenther
2009-05-29 18:08:02 +02:00
Simo Sorce
64d1b5c4e1 Consolidate user create/delete paths in smbpasswd
This patch changes the way smbpasswd behaves when adding/deleting users.
smbpasswd now calls pdb_create_user/pdb_delete_user, this means that if
add/delete user scripts are configured then they are used to create or
delete unix users as well. If the scripts are not defined the behavioris
unchanged.
This also allow to use smbpasswd -a/-x with ldapsam:editposix to allow
automatic creation/deletion of users.

Signed-off-by: Günther Deschner <gd@samba.org>
2009-05-29 18:03:42 +02:00
Günther Deschner
bff54b90c3 util: move add_gid_to_array_unique to toplevel and add add_uid_to_array_unique.
Guenther
2009-05-29 13:49:58 +02:00
Volker Lendecke
01ea4249da TALLOC_ZERO_P->talloc_zero 2009-05-28 10:52:04 +02:00
Volker Lendecke
d07464b21f Do not segfault in pdb_search_destructor if no real search was started 2009-05-28 10:52:04 +02:00
Marc VanHeyningen
75de7c0e87 s3: zero an uninitialized array
Invalid pointers were being dereferenced in lookup_sids causing
occasional seg faults.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-27 12:37:35 -07:00
Volker Lendecke
49ca690b4b Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STAT
This patch introduces

struct stat_ex {
        dev_t           st_ex_dev;
        ino_t           st_ex_ino;
        mode_t          st_ex_mode;
        nlink_t         st_ex_nlink;
        uid_t           st_ex_uid;
        gid_t           st_ex_gid;
        dev_t           st_ex_rdev;
        off_t           st_ex_size;
        struct timespec st_ex_atime;
        struct timespec st_ex_mtime;
        struct timespec st_ex_ctime;
        struct timespec st_ex_btime; /* birthtime */
        blksize_t       st_ex_blksize;
        blkcnt_t        st_ex_blocks;
};
typedef struct stat_ex SMB_STRUCT_STAT;

It is really large because due to the friendly libc headers playing macro
tricks with fields like st_ino, so I renamed them to st_ex_xxx.

Why this change? To support birthtime, we already have quite a few #ifdef's at
places where it does not really belong. With a stat struct that we control, we
can consolidate the nanosecond timestamps and the birthtime deep in the VFS
stat calls.

At this moment it is triggered by a request to support the birthtime field for
GPFS. GPFS does not extend the system level struct stat, but instead has a
separate call that gets us the additional information beyond posix. Without
being able to do that within the VFS stat calls, that support would have to be
scattered around the main smbd code.

It will very likely break all the onefs modules, but I think the changes will
be reasonably easy to do.
2009-05-26 17:48:23 +02:00
Simo Sorce
4112bb2428 Move smb_create_user() in samsync
It is not used anywhere else, so make it also static and remove
it from proto.h
2009-05-16 15:30:48 -04:00
Aravind Srinivasan
5aefb44bf0 s3: Fallback to the legacy sid_to_(uid|gid) instead of returning NULL.
This is very similar to be1dfff02d
2009-05-12 17:13:40 -07:00
Jeremy Allison
196084d641 Fix the last few format arg missmatches I missed.
Jeremy.
2009-05-12 10:38:00 -07:00
Volker Lendecke
c9efd454c5 Fix bug 6157
This patch picks the alphabetically smallest one of the multi-value attribute
"uid". This fixes a regression against 3.0 and also becomes deterministic.
2009-05-12 15:21:46 +02:00
Jeremy Allison
b4c9cfb2af Fix a bunch of compiler warnings about wrong format types.
Should make Solaris 10 builds look cleaner.
Jeremy.
2009-05-11 21:56:57 -07:00
Björn Jacke
f238809d23 s3/ldap: also handle DirX return codes 2009-05-08 00:33:30 +02:00
Günther Deschner
fee4c99be4 s3-ldap: fix more callers of smbldap_dn_talloc() that were passing a NULL context.
Guenther
2009-05-05 21:22:28 +02:00
Günther Deschner
5b37df21f6 s3-ldapsam: Fix Bug #6313: ldapsam_update_sam_account() crashes while doing talloc_free on malloced memory.
Guenther
2009-05-05 21:14:53 +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
Andrew Bartlett
9512640155 s3:smbldap Remove smbldap_get_dn
This removes one more caller to pull_utf8_allocate()

Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-06 14:52:51 +02:00
Jeremy Allison
c57b32c5ab Allow pdbedit to change a user rid/sid. Based on a fix from Alexander Zagrebin <alexz@visp.ru>.
Jeremy.
2009-04-01 20:21:02 -07:00
Günther Deschner
d0e1ff4aff s3-passdb: add smb_create_user().
Guenther
2009-04-01 19:12:19 +02:00
Michael Adam
6edaf6188c s3: fix the fix for bug #6195 - dont let smbd child processes panic
This patch makes sure the original and temporary TDBs are closed
_before_ the rename. Originally, the open TDB was renamed, and so
the name passdb.tdb.tmp stayed around in the db context. Hence
upon client connect, the smbd children died because reinit_after_fork()
calling tdb_reopen_all() would try to reopen passdb.tdb.tmp which
existed no longer...

Michael
2009-04-01 12:26:36 +02:00
Jeremy Allison
0b890ae19a Fix the problem of 3.0.x passdb databases being version
3 but using a different hash calculation than 3.2.x passwd
databases (also version 3). Introduces a minor version
number.
Jeremy.
2009-03-27 21:29:37 -07:00
Jeremy Allison
d942d248d6 Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly. For the clustering case.
Clustered setups should have only ever used
the unsigned version of TDB_DATA in the
first place so they can't be in this mess :-).
Just do the normal upgrade in the clustered case.
Jeremy.
2009-03-27 12:13:13 -07:00
Volker Lendecke
f91565544f Fix bug 6097
A client sent a SID with authority 0 and 0 sub-authorities. W2k3 replies with
NT_STATUS_INVALID_SID, even if other SIDs in the list are valid.

Thanks to Pavel <wylda@volny.cz> for the bug report!
2009-03-24 11:59:42 +01:00
Jeremy Allison
f942cb616e Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly.
This is a really nasty one to fix as in order to successfully update the
passdb.tdb we must do the equivalent of a tdbbackup to move to the new hash
values before we do the upgrade.
Jeremy.
2009-03-18 15:44:13 -07:00
Alexander Zagrebin
b4ae0e8d84 Missing break in conversion function prevents tdb password database update. 2009-03-17 15:38:33 -07:00
Dan Sledz
b6616ca8dc s3 pdb_wbc_sam: LookupRids should return sAMAccountName, not NT4 names
Also fix an incorrect TALLOC_FREE
2009-03-12 13:00:47 -07:00
Volker Lendecke
46bcb10b5a Shape up pdb_search a bit by making it a talloc ctx with a destructor 2009-03-07 17:51:21 +01:00
Tim Prouty
ef89c4bc0d s3 passdb: Add back some useful debug statements
Originally removed in be1dfff02d
2009-03-03 16:49:36 -08:00
Dan Sledz
be1dfff02d It appears that the first time we see a uid/gid that winbind can't map,
we end up returning the null sid instead of falling back to the legacy
code.  Next time through the code we'll hit the negative cache and do
the right thing, but we still fail the first time.

If we fail the winbind id to sid mapping, call the legacy version.  This
catches the case where we don't have a negative cache entry for the mapping.
This is better than returning the NULL sid to the caller.
2009-03-02 16:50:19 -08:00
Volker Lendecke
06b018767b Fix an incompatible pointer passed to winbind_get_groups
This is the same bug that was fixed in other places of the code a few times
already:

A C compiler ONLY does automatic type conversions during an assignment.

Passing down a pointer to type A to a function taking type B as an
argument does NOT do any automatic type conversions.

If required, I can dig up the relevant portions of the C standard.
2009-02-25 13:04:19 +01:00
Dan Sledz
aeab22b55c s3: Rename auth_onefs_wb and pdb_onefs_sam
auth_onefs_wb.c -> auth_wbc.c
pdb_onefs_sam.c -> pdb_wbc_sam.c

No changes to functionality
2009-02-24 16:08:06 -08:00
Volker Lendecke
e9467ff26e Fix a typo 2009-02-21 12:54:34 +01:00
Dan Sledz
fc02c3b089 Introduce a new passdb backend: pdb_onefs_sam
Implements a custom backend for onefs that exclusively uses the wbclient
interface for all passdb calls.
It lacks some features of a standard passdb.
In particular it's a read only interface and doesn't implement privileges.
2009-02-20 19:39:07 -08:00
Jeremy Allison
669f2a02e2 Fix printf warnings found on systems where time_t <> long int.
Jeremy.
2009-02-19 13:36:20 -08:00
Jeremy Allison
fab0baeed1 Fix bug #6117 - Samba 3.3.0: pdbedit -a core dumps.
Jeremy.
2009-02-17 13:43:58 -08:00
Steven Danneman
5cd4b7b7c0 s3: Added new parameter "map untrusted to domain"
When enabled this reverts smbd to the legacy domain remapping behavior when
a user provides an untrusted domain

This partially reverts d8c54fdd
2009-02-12 13:55:44 -08:00
Dan Sledz
d8c54fddda s3: Change behavior when seeing an unknown domain.
After a lot of testing against various Windows servers (W2K, W2K3, W2K8),
within an AD domain it seems that unknown domains will only be translated
to the local account domain, not the netbios name of the member server's
domain.  This makes samba act more like Windows.
2009-02-11 19:39:18 -08:00
Volker Lendecke
b1677505a5 Fix some nonempty blank lines 2009-02-08 13:53:49 +01:00
Volker Lendecke
dba6624dca Fix nonempty blank lines 2009-02-01 14:34:22 +01:00
todd stecher
989ad44d32 Memory leaks and other fixes found by Coverity 2009-01-21 17:13:03 -08:00
Michael Adam
62e7849ddc s3:passdb: put login_cache.tdb into cache_dir, not lock_dir.
Michael
2009-01-16 01:02:22 +01:00
Jeremy Allison
b3e6247a9e Fix bug #6035 - Possible race between fcntl F_SETLKW and alarm delivery.
Jeremy.
2009-01-14 13:17:38 -08:00
Jelmer Vernooij
08259c1c52 Add iconv_convenience argument to size functions. 2009-01-01 04:45:33 +01:00
Stefan Metzmacher
7516ba860c s3:pdb_tdb: store the next rid counter in passdb.tdb instead of winbind_idmap.tdb
This upgrades the TDBSAM_VERSION to 4 and SAMU_BUFFER_V4.

metze
2008-12-29 21:10:49 +01:00
Stefan Metzmacher
671469ae7e s3:passdb: add SAMU_BUFFER_V4 with no changes
The upgrade is required because of the followin TDBSAM_VERSION
upgrade.

metze
2008-12-29 21:10:49 +01:00
Stefan Metzmacher
0544734309 s3:passdb: make marshalling struct samu from and to a buffer more generic
This marshalling isn't specific to tdbsam and it's
ugly to have the related functions in two different files.

metze
2008-12-29 21:10:49 +01:00
Jeremy Allison
94df767f21 More asprintf warning fixes.
Jeremy.
2008-12-23 11:45:26 -08:00
Jeremy Allison
aa4abac6b7 Fix more ‘asprintf’, declared with attribute warn_unused_result.
Jeremy.
2008-12-23 10:42:25 -08:00
Jeremy Allison
7fd114bab7 Fix more "warning: ignoring return value of ‘asprintf’, declared with
attribute warn_unused_result"
Jeremy.
2008-12-23 10:27:24 -08:00
Günther Deschner
9203954428 s3-ldapsam: Fix Bug 5957: do not abort rename process on valid rename script.
Guenther
(cherry picked from commit 26139344fd)
(cherry picked from commit 866efa63a2)
2008-12-09 17:41:26 +01:00
Volker Lendecke
3c98d5bd98 Make memcache_add_talloc NULL out the source pointer
This is an orthogonality measure to make clear this pointer now belongs to the
cache.
(cherry picked from commit e6080c6e87d6fe3995b121a772bf3f6343fa666f)
2008-11-14 20:27:46 +01:00
Jeremy Allison
8962be69c7 Make us clean under valgrind --leak-check=full by using talloc_autofree_context() instead of NULL.
Remove the code in memcache that does a TALLOC_FREE on stored pointers. That's a disaster waiting
to happen. If you're storing talloc'ed pointers, you can't know their lifecycle and they should
be deleted when their parent context is deleted, so freeing them at some arbitrary point later
will be a double-free.
Jeremy.
2008-11-06 20:48:13 -08:00
Jeremy Allison
0db0ce4974 Fix bug #5825 - Account locking out doesnt work with an LDAP backend.Based on a problem found by Boyang. Only the pdb_nds backend implements login attempts so this was broken for tdbsam and ldap.
Jeremy.
2008-11-06 06:42:04 -08:00
Günther Deschner
992c03a192 s4-lsa: merge lsa_LookupSids/{2,3} from s3 lsa idl.
Guenther
2008-10-27 19:33:23 +01:00
Jelmer Vernooij
81fabeff2d Use libutil genrand. 2008-10-23 18:46:35 +02:00
Jelmer Vernooij
e16e6e9cb0 Use standard types. 2008-10-22 03:41:24 +02:00
Jelmer Vernooij
389cfee579 Use GUID_random. 2008-10-14 02:41:20 +02:00
Jelmer Vernooij
1b99d8fbb5 Use common util_file code. 2008-10-12 17:34:43 +02:00
Volker Lendecke
f3ba7fc0b9 Store a local schannel key in secrets.tdb 2008-10-06 09:54:16 +02:00
Simo Sorce
3fa16da8c7 Revert "Split lookup_name() and create a new functiong called"
This reverts commit 8594edf666.
(This used to be commit ad462e2e2d)
2008-09-03 14:36:43 -04:00
Simo Sorce
c5894e1477 Merge branch 'v3-devel' of ssh://git.samba.org/data/git/samba into v3-devel
(This used to be commit 8e4dca3b94)
2008-09-03 11:52:54 -04:00
Jeremy Allison
dc3f6b0861 Fix bug spotted by Simo - don't use legacy if expired entry.
Jeremy.
(This used to be commit a7bbd33139)
2008-08-26 18:05:34 -07:00
Jeremy Allison
d1f140a9ba Don't ask winbindd if we got a -ve cache entry.
Jeremy.
(This used to be commit 91f85d0dca)
2008-08-26 16:14:25 -07:00
Simo Sorce
a1de4e988d Merge branch 'v3-devel' of ssh://git.samba.org/data/git/samba into v3-devel
(This used to be commit e038f1cf9f)
2008-08-26 18:56:49 -04:00
Jeremy Allison
95cc5ee395 Fix the build :-(. Ask winbindd if we find a negative cache entry (or should
we just call the legacy function ?).
Jeremy.
(This used to be commit 566d3b6e76)
2008-08-26 15:51:56 -07:00
Jeremy Allison
d2f223d83d Get smbd to look (read-only) into the winbindd cache for uid/gid <--> sid mappings.
Jeremy.
(This used to be commit 31ba955d69)
2008-08-26 14:52:11 -07:00
Simo Sorce
5e7655fa27 Split lookup_name() and create a new functiong called
lookup_domain_name(). This new function accept separated
strings for domain and name.
(This used to be commit 8594edf666)
2008-08-17 19:54:41 -04:00
Andrew Tridgell
fe3dd9b3e6 fixed lots of places that paniced on a failed transaction_commit,
thinking it was a failure of a transaction cancel
(This used to be commit 22dbe158ed)
2008-08-13 11:54:10 +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
Karolin Seeger
669afbc291 pdb_interface: Fix typo in debug message.
Karolin
(This used to be commit e04da654c0)
2008-07-29 12:05:40 +02:00
Jeremy Allison
61859a18f0 Add casts to uint32_t to match prototype for sid_append_rid().
Jeremy.
(This used to be commit 1500401967)
2008-07-24 12:01:46 -07:00
Jeremy Allison
a4932d6657 Use sys_getgrnam not getgrnam. Pointed out by Herb.
Jeremy.
(This used to be commit 43eec65170)
2008-07-24 11:56:49 -07:00
John H Terpstra
b39237d3b3 pdb_ldap: Raise level for debug message to avoid log file flooding.
(This used to be commit 9b863a10da)
2008-07-24 09:49:28 +02:00
Karolin Seeger
490b60b500 Use LDAP macros instead of attribute names.
Karolin
(This used to be commit 7dae8b04f1)
2008-07-18 15:36:20 +02:00
Karolin Seeger
df15541926 Fix typo.
retieve -> retrieve

Karolin
(This used to be commit 37c6413070)
2008-07-14 16:40:36 +02:00
Volker Lendecke
e613ecbea5 Revert "Make use of sid_check_is_in_unix_users/groups"
This reverts commit cd8e63b2b4.
(This used to be commit 061e55d4f4)
2008-07-11 17:53:25 +02:00
Volker Lendecke
68071e94a5 Revert "Don't scream, better explain a bit in comments"
This reverts commit dcc39ed004.
(This used to be commit 26ca09a357)
2008-07-11 17:53:25 +02:00
Volker Lendecke
d803fa6e46 Revert "Remove an unused variable"
This reverts commit 454cb852e0.
(This used to be commit cae8ec3199)
2008-07-11 17:53:25 +02:00
Volker Lendecke
90f3da4720 Fix some memleaks regarding trustdom passwords
(This used to be commit 3d2913d599)
2008-07-10 18:25:00 +02:00
Volker Lendecke
ad91d960d0 Fix some uninitialized variable references via ndr_print
(This used to be commit 26fb3fea81)
2008-07-10 18:24:54 +02:00