summaryrefslogtreecommitdiff
path: root/source3/passdb
AgeCommit message (Collapse)AuthorFilesLines
2009-06-08Implement pdb_ads_delete_aliasVolker Lendecke1-1/+44
2009-06-08Implement pdb_ads_create_dom_group()Volker Lendecke1-1/+69
2009-06-07More pdb_ads stuffVolker Lendecke1-6/+108
2009-06-07Make "net sam list" work for groups, aliases and builtinsVolker Lendecke1-7/+58
2009-06-07Return full info in pdb_ads_search_users()Volker Lendecke1-5/+17
2009-06-07s3-samr: fix return code of _samr_LookupRids when run with pdb_ldap.Günther Deschner1-0/+5
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-06s3/passdb: Fix debug message: 'net setmaxrid' does not exist.Karolin Seeger1-2/+2
This is aiming bug #6351. Karolin
2009-06-06Add an early prototyp of pdb_ads.c.Volker Lendecke1-0/+1284
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-05-31Fix some nonempty blank linesVolker Lendecke1-52/+52
2009-05-29s3-passdb: fix uninitialized variable in local_password_change().Günther Deschner1-1/+1
Guenther
2009-05-29Consolidate user create/delete paths in smbpasswdSimo Sorce1-147/+179
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-29util: move add_gid_to_array_unique to toplevel and add add_uid_to_array_unique.Günther Deschner1-20/+0
Guenther
2009-05-28TALLOC_ZERO_P->talloc_zeroVolker Lendecke1-1/+2
2009-05-28Do not segfault in pdb_search_destructor if no real search was startedVolker Lendecke1-1/+2
2009-05-27s3: zero an uninitialized arrayMarc VanHeyningen1-1/+4
Invalid pointers were being dereferenced in lookup_sids causing occasional seg faults. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-26Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke1-1/+1
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-16Move smb_create_user() in samsyncSimo Sorce1-60/+0
It is not used anywhere else, so make it also static and remove it from proto.h
2009-05-12s3: Fallback to the legacy sid_to_(uid|gid) instead of returning NULL.Aravind Srinivasan2-26/+4
This is very similar to be1dfff02d562e42a7847bd02fed8538630d3f41
2009-05-12Fix the last few format arg missmatches I missed.Jeremy Allison1-4/+4
Jeremy.
2009-05-12Fix bug 6157Volker Lendecke1-1/+1
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-11Fix a bunch of compiler warnings about wrong format types.Jeremy Allison3-10/+10
Should make Solaris 10 builds look cleaner. Jeremy.
2009-05-08s3/ldap: also handle DirX return codesBjörn Jacke1-0/+2
2009-05-05s3-ldap: fix more callers of smbldap_dn_talloc() that were passing a NULL ↵Günther Deschner2-2/+2
context. Guenther
2009-05-05s3-ldapsam: Fix Bug #6313: ldapsam_update_sam_account() crashes while doing ↵Günther Deschner1-1/+1
talloc_free on malloced memory. Guenther
2009-04-14Rework Samba3 to use new libcli/auth code (partial)Andrew Bartlett4-1/+4
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-14Convert Samba3 to use the common lib/util/charset APIAndrew Bartlett2-15/+15
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-06s3:smbldap Remove smbldap_get_dnAndrew Bartlett2-29/+18
This removes one more caller to pull_utf8_allocate() Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-01Allow pdbedit to change a user rid/sid. Based on a fix from Alexander ↵Jeremy Allison1-3/+57
Zagrebin <alexz@visp.ru>. Jeremy.
2009-04-01s3-passdb: add smb_create_user().Günther Deschner1-0/+59
Guenther
2009-04-01s3: fix the fix for bug #6195 - dont let smbd child processes panicMichael Adam1-2/+16
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-03-27Fix the problem of 3.0.x passdb databases being versionJeremy Allison1-5/+43
3 but using a different hash calculation than 3.2.x passwd databases (also version 3). Introduces a minor version number. Jeremy.
2009-03-27Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison1-1/+2
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-24Fix bug 6097Volker Lendecke1-1/+1
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-18Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb ↵Jeremy Allison1-14/+201
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-17Missing break in conversion function prevents tdb password database update.Alexander Zagrebin1-0/+1
2009-03-12s3 pdb_wbc_sam: LookupRids should return sAMAccountName, not NT4 namesDan Sledz1-5/+7
Also fix an incorrect TALLOC_FREE
2009-03-07Shape up pdb_search a bit by making it a talloc ctx with a destructorVolker Lendecke4-57/+46
2009-03-03s3 passdb: Add back some useful debug statementsTim Prouty1-18/+24
Originally removed in be1dfff02d562e42a7847bd02fed8538630d3f41
2009-03-02It appears that the first time we see a uid/gid that winbind can't map,Dan Sledz1-14/+22
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-02-25Fix an incompatible pointer passed to winbind_get_groupsVolker Lendecke1-1/+3
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-24s3: Rename auth_onefs_wb and pdb_onefs_samDan Sledz1-58/+73
auth_onefs_wb.c -> auth_wbc.c pdb_onefs_sam.c -> pdb_wbc_sam.c No changes to functionality
2009-02-21Fix a typoVolker Lendecke1-1/+1
2009-02-20Introduce a new passdb backend: pdb_onefs_samDan Sledz1-0/+433
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-19Fix printf warnings found on systems where time_t <> long int.Jeremy Allison1-8/+8
Jeremy.
2009-02-17Fix bug #6117 - Samba 3.3.0: pdbedit -a core dumps.Jeremy Allison1-1/+12
Jeremy.
2009-02-12s3: Added new parameter "map untrusted to domain"Steven Danneman1-0/+18
When enabled this reverts smbd to the legacy domain remapping behavior when a user provides an untrusted domain This partially reverts d8c54fdd
2009-02-11s3: Change behavior when seeing an unknown domain.Dan Sledz1-19/+0
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-08Fix some nonempty blank linesVolker Lendecke1-41/+41
2009-02-01Fix nonempty blank linesVolker Lendecke1-61/+60
2009-01-21Memory leaks and other fixes found by Coveritytodd stecher2-0/+7