Jeremy Allison
3ede4ffe96
Fix bug #8561 - Password change settings not fully observed.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Nov 16 00:22:41 CET 2011 on sn-devel-104
2011-11-16 00:22:41 +01:00
Amitay Isaacs
29b5a95b1f
py_passdb: Cannot steal an item pointer from an array
...
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Fri Nov 11 12:04:33 CET 2011 on sn-devel-104
2011-11-11 12:04:33 +01:00
Andrew Bartlett
0f2ff7c5c2
s3-py_passdb Ensure that group mapping list input is initailised
...
This may help to ensure we consistantly crash on an incorrect de-reference.
Andrew Bartlett
2011-11-09 23:38:25 +01:00
Andrew Bartlett
1fb836d863
s3-passdb Initialise the correct level of pointer dereference
...
*pp_rmap may be NULL or un-initialised data.
This was introduced by 995d156726
.
Andrew Bartlett
2011-11-09 23:38:25 +01:00
Günther Deschner
2330e52cac
s3-passdb: use tevent_context in passdb.
...
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct 28 13:09:47 CEST 2011 on sn-devel-104
2011-10-28 13:09:47 +02:00
Simo Sorce
605d7d965a
pdb-interface: Do not use unid_t here
...
This interface needs to be publicly available, unid_t here is not really useful
and makes it harder to use it as unid_t is not a public union.
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Oct 18 20:57:16 CEST 2011 on sn-devel-104
2011-10-18 20:57:16 +02:00
Günther Deschner
111372541f
s3-passdb: remove libwbclient header dependency for passdb/lookup_sid.h.
...
Guenther
2011-10-14 12:07:25 +02:00
Günther Deschner
876f48ffb1
s3-passdb: remove fstring from pdb_set_user_sid_from_string().
...
Guenther
2011-10-14 12:07:25 +02:00
Günther Deschner
d47c25401a
s3-passdb: add define guards for machine_sid.h.
...
Guenther
2011-10-14 12:07:24 +02:00
Günther Deschner
d6a1867349
s3-passdb: use uintX_t at least in headers.
...
Guenther
2011-10-14 12:07:24 +02:00
Günther Deschner
d981ceb464
s3-passdb: move passdb prototypes into passdb.h
...
Guenther
2011-10-14 12:07:24 +02:00
Simo Sorce
995d156726
s3-group-mapping: Remove fstrings from GROUP_MAP.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
2011-10-12 19:28:12 +02:00
Michael Adam
6760011761
s3:dbwrap: change dbwrap_store_uint32() to NTSTATUS return type
...
for consistency and better error propagation
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Oct 11 15:51:00 CEST 2011 on sn-devel-104
2011-10-11 15:51:00 +02:00
Michael Adam
c9bc1e4924
s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return type
...
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
658f72128f
s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of bool)
...
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
603c3e1bcb
s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return code
...
Return the int32 value retrieved from the db by reference.
Before this, return value "-1" was used as a error indication,
but it could also be a valid value from the database.
2011-10-11 14:17:58 +02:00
Michael Adam
f03e4aea66
s3:passdb:account_pol: use dbwrap_fetch_uint32, not dbwrap_fetch_int32 for the DB version
...
This is also stored as uint32_t.
2011-10-11 14:17:58 +02:00
Michael Adam
3f214284c7
s3:secrets: convert to use dbwrap wrapper functions only
...
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
8b4845bd75
s3:passdb: convert account_pol to use dbwrap wrapper functions only
...
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
8b4dd99dae
s3:passdb: convert machine_sid to use dbwrap wrapper functions only
...
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
a91f06a722
s3:passdb: convert pdb_tdb to use dbwrap wrapper functions.
...
Avoid direct use of the db_record and db_context structs
2011-10-11 14:17:57 +02:00
Michael Adam
0e28448a78
s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS
2011-10-11 14:17:56 +02:00
Günther Deschner
e5682847fa
s3-passdb: split out passdb/pdb_ipa.h.
...
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Oct 11 12:15:36 CEST 2011 on sn-devel-104
2011-10-11 12:15:36 +02:00
Günther Deschner
6cc2843dc6
s3-passdb: split out passdb/pdb_nds.h.
...
Guenther
2011-10-11 10:41:29 +02:00
Günther Deschner
a1f4fe7e08
s3-passdb: split out passdb/pdb_ldap.h.
...
Guenther
2011-10-11 10:41:29 +02:00
Andrew Bartlett
b21b012756
lib/param move source4 param code to the top level
...
This is done so that the lpcfg_ functions are available across the whole
build, either with the struct loadparm_context loaded from an smb.conf directly
or as a wrapper around the source3 param code.
This is not the final, merged loadparm, but simply one step to make
it easier to solve other problems while we make our slow progress
on this difficult problem.
Andrew Bartlett
2011-10-11 13:41:34 +11:00
Günther Deschner
795aefec0c
s3-passdb: split out passdb/pdb_smbpasswd.h.
...
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 10 20:14:46 CEST 2011 on sn-devel-104
2011-10-10 20:14:46 +02:00
Günther Deschner
8c2f72d6b8
s3-passdb: split out passdb/pdb_wbc_sam.h.
...
Guenther
2011-10-10 18:40:40 +02:00
Günther Deschner
efab0086ba
s3-passdb: split out passdb/pdb_tdb.h.
...
Guenther
2011-10-10 18:40:33 +02:00
Andrew Bartlett
4980cd772a
build: Remove _SAMBA_WAF_BUILD_
...
The _SAMBA_BUILD_ macro can pick the difference between autoconf and waf builds now
Andrew Bartlett
2011-10-07 17:45:20 +11:00
Andrew Bartlett
055f017b36
build: Reduce build systems to just top level waf and autoconf
...
The s3-waf build system is a key component of the top level build, but
with this commit is is no longer available directly. This reduces the
number of build system combinations in master as we prepare for the
Samba 4.0 release.
Andrew Bartlett
2011-10-07 17:42:03 +11:00
Andrew Bartlett
b5cc6a0ad2
s3-pdb_samba4: Remove unused attribute from domain search
2011-09-27 22:43:06 +02:00
Simo Sorce
f7419172f0
s3-passdb: Cleanup use of fstring and move to talloc.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-09-26 18:25:26 +02:00
Sumit Bose
751e7d4d33
s3-pdb_ipa: Add supprted encryption types to struct pdb_trusted_domain
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31 12:53:36 +02:00
Sumit Bose
4f6de78a12
s3-pdb_ipa: Add posix offset to struct pdb_trusted_domain
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31 12:52:52 +02:00
Sumit Bose
bb86062f61
s3-pdb_ipa: Derive domain GUID from SID
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31 11:34:25 +02:00
Amitay Isaacs
322b5253f4
s3-passdb: Allocate talloc stackframe before calling pdb_get_group_sid()
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26 14:06:07 +02:00
Amitay Isaacs
17c74e5dfd
s3-passdb: Make domain_sid argument optional for search_aliases method
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26 10:06:33 +10:00
Amitay Isaacs
0cfeb65a0b
s3-passdb: Return assigned number of hours and not MAX_HOURS_LEN
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26 10:06:33 +10:00
Amitay Isaacs
a38a3b16e1
s3-passdb: Convert lm_pw and nt_pw to python string using length
...
lm_pw and nt_pw are fixed length strings and convert them to python
strings as fixed length strings.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-26 10:06:32 +10:00
Andrew Tridgell
fb612af655
pdb-samba4: use ldb_get_default_basedn() instead of NULL
...
this makes pdb-samba4 safe for multi-domain setups
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:37 +10:00
Andreas Schneider
d713f9e9f5
s3-passdb: Only delete 1 entry from memcache.
...
If we delete or update one user we shouldn't flush the complete
memcache.
Signed-off-by: Simo Sorce <idra@samba.org>
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Sun Aug 21 16:39:10 CEST 2011 on sn-devel-104
2011-08-21 16:39:10 +02:00
Andreas Schneider
99bb3eed1d
s3-passdb: Remove always the user from getpwsid cache.
...
We should do it always, not only in the pdb_default_delete_user()
function.
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:25 -04:00
Andreas Schneider
1152aa8e03
s3-passdb: Keep caches coherent
...
When deleting a user send a message to all interested parties so they can
purge their caches. Otherwise some processes may positively respond with a
cached getpwnam, when the user have actully been removed.
Without this some tests that remove and then immediately create users are
flakey.
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:25 -04:00
Andreas Schneider
177db0a880
s3-id_cache: Move id caches mgmt out of smbd
...
We must leave the MSG_IDMAP_KILL operation in SMBD as it uses smbd
specific internal globals and makes sense only in the context of a smbd
daemon.
The rest is moved under lib/ as we need to deal with id cache cleanups
in other daemons too (like lsasd).
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:08:25 -04:00
Matthias Dieter Wallnöfer
c21c254508
s3:passdb/py_passdb.c - restore Python >= 2.4 compatibility
...
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Aug 19 21:03:44 CEST 2011 on sn-devel-104
2011-08-19 21:03:44 +02:00
Andrew Bartlett
0db0e93517
s3-passdb pdb_samba4 handles PDB_PWHISTORY already
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Aug 19 10:40:16 CEST 2011 on sn-devel-104
2011-08-19 10:40:16 +02:00
Amitay Isaacs
22cce00151
s3-passdb: Fix the get/set routines for pw_history for samu
...
Return pw_history with current string length (which is a multiple
of PW_HISTORY_ENTRY_LEN) and same thing for setting the pw_history.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:11 +10:00
Amitay Isaacs
dadaca01d2
s3-passdb: Display username when reporting error on add_sam_account.
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:08 +10:00
Amitay Isaacs
876f9cc290
s3-passdb: Use pdb_get_nt_passwd() to get nt passwd.
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:07 +10:00
Amitay Isaacs
0fef5a3a26
s3-passdb: Fix call for search_aliases(). It returns bool and not NTSTATUS.
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:02 +10:00
Amitay Isaacs
1c1f4e27a8
s3-passdb: Return list of sids from python wrapper enum_group_members
...
Instead of returning rids as the C api does, return sids, so it is
similar to enum_aliasmem and can be used easily in s3_upgrade.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:01 +10:00
Amitay Isaacs
590ed81c48
s3-passdb: Make arguments for python wrapper enum_group_mapping() optional
...
Set the defaults, if no arguments are provided.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:00 +10:00
Amitay Isaacs
f4c7a448d4
s3-passdb: Added python wrapper for passdb methods
...
Added following methods
- uid_to_sid, gid_to_sid, sid_to_id, new_rid
- get_trusteddom_pw, set_trusteddom_pw, del_trusteddom_pw, enum_trusteddoms
- get_trusted_domain, get_trusted_domain_by_sid, set_trusted_domain,
del_trusted_domain, enum_trusted_domains
- get_secret, set_secret, delete_secret
Updated documentation for all methods
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:34:59 +10:00
Amitay Isaacs
5b444916bf
s3-passdb: Python wrapper for passdb
...
- Added Groupmap python wrapper
- Added passdb methods
getgrsid, getgrgid, getgrnam
create_dom_group, delete_dom_group
add_group_mapping_entry, update_group_mapping_entry, delete_group_mapping_entry
enum_group_mapping, enum_group_members
add_groupmem, del_groupmem
create_alias, delete_alias
get_aliasinfo, set_aliasinfo
add_aliasmem, del_aliasmem, enum_aliasmem
get_account_policy, set_account_policy
search_groups, search_aliases
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:34:57 +10:00
Amitay Isaacs
4201d6fd68
s3-passdb: Replace SMB_MALLOC_ARRAY()/SAFE_FREE() with talloc equivalents.
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:34:56 +10:00
Björn Jacke
dcb5720ad0
s3/ldap: don't continue if we couldn't get the domain info on startup
...
while some things work without the domain info, some important things don't,
which is highly irritating. As even calls like EnumTrustDom fail and
thus clients' domain logins fail we are sufficiently broken to refuse to go on.
Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Thu Aug 18 12:48:37 CEST 2011 on sn-devel-104
2011-08-18 12:48:37 +02:00
Andrew Bartlett
3df9e62c97
s3-passdb Use supplied pdb_methods in default passdb search handlers
2011-08-15 08:26:06 +02:00
Andrew Bartlett
d2d2e7ab02
s3-passdb: Fix python < 2.6 build errors in passdb python wrapper
...
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Aug 14 03:59:48 CEST 2011 on sn-devel-104
2011-08-14 03:59:48 +02:00
Amitay Isaacs
1c1f7df956
s3-passdb: Added python method to get_global_sam_sid
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:31:09 +10:00
Amitay Isaacs
e580f33b13
s3-passdb: Return dom_sid and guid with correct python types.
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:31:09 +10:00
Amitay Isaacs
a252e69db2
passdb: Move python wrapper for passdb in samba3 python package
2011-08-13 12:31:07 +10:00
Amitay Isaacs
6a18664d51
s3-passdb: Connect to specified samdb if location is provided, otherwise use default
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:30:50 +10:00
Amitay Isaacs
d7ab07e86f
s3-passdb: Fix the error messages and return correct NTSTATUS
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:30:50 +10:00
Andrew Bartlett
93e8d3b381
s4-scripting Rename passdb upgrade routine to avoid conflict with upgradeprovision
2011-08-13 12:30:49 +10:00
Andrew Bartlett
00364e4e0d
s3-passdb Add support for pdb_add_sam_account() and password hashes to pdb_samba4
...
This will help when using this as part of the Samba3 passdb -> Samba4
ldb database upgrade script.
Andrew Bartlett
2011-08-13 12:30:49 +10:00
Andrew Bartlett
2993113a56
s4-dsdb Add ability to force a particular SID in the upgrade case
2011-08-13 12:30:49 +10:00
Andrew Bartlett
add8505fde
s3-passdb Make pdb_element_is_changed available to all passdb modules
...
This will allow pdb_samba4 to use this
Andrew Bartlett
2011-08-13 12:30:49 +10:00
Amitay Isaacs
65e12c0501
passdb: Allocate talloc stackframe before calling in pdb functions.
2011-08-13 12:30:48 +10:00
Amitay Isaacs
ae9a3274bc
passdb: Call with correct backend methods instead of default methods
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:30:48 +10:00
Amitay Isaacs
2e0ccc4772
passdb: Added python wrapper to passdb
...
- Added python wrapper for samu structure.
- Added python wrapper for passdb methods:
domain_info(), getsampwnam(), getsampwsid(), create_user(),
delete_user(), add_sam_account(), delete_sam_account(),
update_sam_account(), rename_sam_account(), search_users()
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-13 12:30:44 +10:00
Amitay Isaacs
08ccc6ed51
passdb: Add a function to read secrets db from a specified path
...
This allows to load secrets db from a different location. The original
secrets_init() now calls secrets_init_path() with lp_private_dir().
2011-08-13 10:25:06 +10:00
Amitay Isaacs
6f21f556c1
passdb: Add a function to expose loaded backend list.
...
This function is used in python wrapper to list available python backends.
2011-08-13 10:25:06 +10:00
Günther Deschner
51481c5912
s3-secrets: add lsa_secret passdb api.
...
Guenther
2011-07-31 22:37:26 +02:00
Günther Deschner
f9a5df8929
s3-passdb: add dummy calls to control global (replicated) secrets.
...
Guenther
2011-07-31 22:37:26 +02:00
Michael Adam
0b5c4a601a
s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/
...
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29 13:34:22 +02:00
Michael Adam
1abdd9b2bb
s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.
...
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and
make the fallbacke implementation functoins non-static and create a
dbwrap_private.h header file that contains their prototypes.
2011-07-29 12:23:13 +02:00
Andrew Tridgell
356a2cc0b0
s3-waf: the passdb subsystem needs to be called pdb
...
the 'pdb' name is builtin to the passdb module loading code as a fixed
string. We need to call the subsystem pdb so that external passdb
modules end up in bin/modules/pdb/ where they can be found by the
Samba3 module loader
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-28 15:20:51 +10:00
Jeremy Allison
ee34c25c8a
First part of fix for bug 8310 - toupper_ascii() is broken on big-endian systems
...
Remove
int toupper_ascii(int c);
int tolower_ascii(int c);
int isupper_ascii(int c);
int islower_ascii(int c);
and replace with their _m equivalents, as they are identical.
2011-07-19 13:19:29 -07:00
Andrew Bartlett
6e6aaacedb
lib/util Move bitmap.c to lib/util
2011-07-08 11:23:23 +02:00
Andrew Bartlett
0ac4f64928
s3-build link passdb modules against libpassdb
...
This ensures that they don't include a duplicate copy of
pdb_interface.c functions, because they will instead link the library.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jul 4 12:24:50 CEST 2011 on sn-devel-104
2011-07-04 12:24:50 +02:00
Andrew Bartlett
6b97a3b1ff
s3-build allow_undefined_symbols=False is the default now
2011-07-04 19:03:52 +10:00
Günther Deschner
8bc3f957bc
s3-waf: add some missing tdb dependencies.
...
Guenther
2011-06-28 16:43:01 +02:00
Andrew Bartlett
5db74b9607
lib/util Remove samba-util-common!
...
All of this code is now in common, so we don't need the second
'-common' library any more!
Andrew Bartlett
2011-06-21 09:36:22 +10:00
Rusty Russell
d925b327f4
tdb_compat: Higher level API fixes.
...
My previous patches fixed up all direct TDB callers, but there are a
few utility functions and the db_context functions which are still
using the old -1 / 0 return codes.
It's clearer to fix up all the callers of these too, so everywhere is
consistent: non-zero means an error.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Sumit Bose
d5661467e1
s3-passdb: Implement new pdb trust calls for the default backend
...
Signed-off-by: Simo Sorce <idra@samba.org>
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Sun Jun 12 06:45:25 CEST 2011 on sn-devel-104
2011-06-12 06:45:25 +02:00
Andrew Bartlett
74eed8f3ed
s3-param Remove special case for global_myname(), rename to lp_netbios_name()
...
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.
Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
5e26e94092
s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
...
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
ad0a07c531
s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
...
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
d5e6a47f06
s3-talloc Change TALLOC_P() to talloc()
...
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653
s3-talloc Change TALLOC_ARRAY() to talloc_array()
...
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
73b377432c
s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
...
Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.
Andrew Bartlett
2011-06-09 12:40:08 +02:00
Matthias Dieter Wallnöfer
059e735e41
s3:passdb/pdb_samba4.c - remove unused variable
...
Reviewed-by: Tridge
2011-06-09 09:35:26 +02:00
Matthias Dieter Wallnöfer
4d0c00bb33
s3:passdb/pdb_samba4.c - fix a format specifier warning
...
Reviewed-by: Tridge
2011-06-09 09:35:15 +02:00
Andrew Bartlett
d72b05cfe7
s3-passdb use new loadparm_init_s3 rather than reloading the smb.conf
2011-06-06 17:37:51 +10:00
Michael Adam
c0fc7aa129
s3:passdb: add GPL/copyright header to machine_sid.h
2011-05-31 18:37:29 +02:00
Michael Adam
7d40c88695
s3:passdb/proto.h: add _PASSDB_PROTO_H_ guard
2011-05-31 01:44:27 +02:00
Michael Adam
b3cbcd0eda
s3:passdb/proto.h: add GPL/copyright comment header
2011-05-31 01:44:27 +02:00
Sean Finney
0f8018676a
Fix numerous missing dependencies in WAF build scripts
...
With the recent consolidation of code between s3 and s4, a number of new
dependencies have been implicitly introduced. For example, previous s3
code gained an implicit dependency on talloc after the charset related
consolidation (lib/util/charset/charset.h now includes talloc.h). When
building against the embedded version of talloc this isn't a problem
since the paths are automatically added to the search path, but when
building against the external libraries build failures will occur for
all components that don't directly or indirectly include talloc as
a dependency.
Since charset.h is included from util.h, which in turn is included from
includes.h, this means most of the codebase (s3 and s4) has such an
undeclared dependency.
Therefore, samba-util-common and samba-util have been added as
dependencies to the s3 and s4 code respectively, for all cases where
the source would otherwise fail to build. Additionally, a few other
dependencies are added in specific wscript_build files to address
similar dependency-related problems.
https://bugzilla.samba.org/show_bug.cgi?id=8128
Signed-off-by: Sean Finney <seanius@seanius.net>
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed May 25 19:22:13 CEST 2011 on sn-devel-104
2011-05-25 19:22:13 +02:00
Jeremy Allison
309a8fd7c6
Fix bug #7054 - X account flag does not work when pwdlastset is 0.
...
Don't allow pass_last_set_time to be set to zero (which means
"user must change password on next logon") if user object doesn't
allow password change.
Don't automatically allow user object password change if
"user must change password on next logon" is set.
Jim please check.
Jeremy.
2011-05-24 20:14:35 +02:00
Andrew Bartlett
da662b82b8
s3-lib Replace StrnCaseCmp() with strncasecmp_m()
...
strncasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.
Andrew Bartlett
2011-05-18 16:12:08 +02:00
Andrew Bartlett
a47c7f6b4c
s3-passdb: added pdb_samba4
...
This uses direct LDB operations and calls to the dsdb library to allow
passdb operations (such as pdbedit and smbpasswd) offline, and uses
transactions internally for database consistency.
Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2011-05-08 19:00:28 +02:00
Andrew Bartlett
25cfa29e29
s3-passdb Redirect domain GUID and SID queries to the passdb stack
...
This is done if the passdb module supports PDB_ADS, and ensures that a
random SID is never made up locally for these directories.
This is only enabled when in the waf build, due to dependency issues.
Andrew Bartlett
2011-05-08 17:48:33 +02:00
Günther Deschner
d8cfca3a9b
s3: only include tdb headers where needed.
...
Guenther
2011-05-06 10:48:10 +02:00
Jeremy Allison
7d6ebe0de7
More const fixes. Remove CONST_DISCARD.
2011-05-06 01:44:07 +02:00
Jeremy Allison
cabd9e70e2
Simple +1 changes in hardcoded lengths when changing from safe_strcpy to strlcpy.
2011-05-04 12:12:14 -07:00
Volker Lendecke
d9c1d1f709
s3: Fix Coverity ID 2471: UNINIT
...
Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Apr 14 16:22:58 CEST 2011 on sn-devel-104
2011-04-14 16:22:58 +02:00
Volker Lendecke
ddfeccc6e4
s3: Use wbcSidsToUnixIds in create_local_token
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-13 14:13:25 -07:00
Volker Lendecke
6a77b52169
s3: Fix Coverity ID 2470: STRAY_SEMICOLON
...
Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Apr 13 12:57:43 CEST 2011 on sn-devel-104
2011-04-13 12:57:43 +02:00
Andrew Bartlett
5694ba507c
libcli/ldap pull LIBCLI_LDAP_MESSAGE and LIBCLI_LDAP_NDR into a library
...
This reduces symbol duplication
Andrew Bartlett
2011-04-13 11:47:36 +10:00
Volker Lendecke
5cd6d93fa1
s3: Fix Coverity ID 2472, UNINIT
...
Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Apr 11 17:14:35 CEST 2011 on sn-devel-104
2011-04-11 17:14:35 +02:00
Volker Lendecke
d2d1d17323
s3: Fix Coverity ID 2473, UNINIT
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-04-11 16:30:19 +02:00
Michael Adam
32d816d59b
s3:passdb:pdb_ipa: fix a C++ implicit void * cast warnings
2011-04-07 17:08:16 +02:00
Sumit Bose
6681e451c9
s3-pdb_ipa: Create DN for new object
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-04-06 11:53:57 +02:00
Sumit Bose
1cbe59e174
s3-pdb_ipa: Add ipasam_create_dom_group()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-04-06 11:53:56 +02:00
Sumit Bose
2ee1d09f33
s3-pdb_ipa: Add ipasam_create_user()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-04-06 11:53:56 +02:00
Sumit Bose
c47df017dd
s3-pdb_ipa: Detect IPA server
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-04-06 11:53:56 +02:00
Sumit Bose
ca22befb9c
s3-pdb_ipa: Use new smbldap_make_mod_blob() without a return value
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-04-06 11:53:56 +02:00
Günther Deschner
02c6940964
s3-ipasam: rename of smbldap_make_mod_blob to _smbldap_make_mod_blob.
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
2011-04-06 11:53:56 +02:00
Sumit Bose
db76adc308
s3-pdb_ipa: Fix indentation
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-04-06 11:53:56 +02:00
Günther Deschner
a730dff783
s3-libndr: add ../librpc/ndr/libndr.h include in some places.
...
Guenther
2011-03-31 00:14:01 +02:00
Günther Deschner
33082d016e
s3-passdb: move LOOKUP_NAME_ flags to passdb where they belong to.
...
Guenther
2011-03-30 15:14:55 +02:00
Günther Deschner
c2d6260f10
s3: only include lib/privileges.h where needed.
...
This finally removes the global lsa.h inclusion.
Guenther
2011-03-30 01:13:10 +02:00
Günther Deschner
1d383daf39
s3-passdb: move lsa_dom_info and lsa_name_info out of smb.h into passdb.
...
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
a22a53ea44
s3-passdb: move util_builtin.c out of passdb.
...
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
7d798ac485
s3-passdb: move util_unixsids.c out of passdb.
...
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
bcee6c1fe2
s3-passdb: move util_wellknown.c out of passdb.
...
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
f378f9f144
s3-passdb: add machine_sid.h and lookup_sid.h
...
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
2f36ef7225
s3-passdb: add passdb.h where needed.
...
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
35c2d8ec1e
s3-passdb: move passdb headers to passdb/proto.h.
...
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
03e6082e3c
s3: create_builtin_users/administrators belongs to passdb not auth.
...
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
0e771263ee
s3-includes: only include system/filesys.h when needed.
...
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
49fcf653b1
s3-includes: only include system/passwd.h when needed.
...
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
d85f140826
s3-winbind: remove global inclusion of libwbclient.
...
Guenther
2011-03-30 01:13:06 +02:00
Günther Deschner
96487959e9
lib/util/util_pw: share more code between lib/util/util_pw.c and source3/lib/username.c
...
Guenther
2011-03-30 01:13:06 +02:00
Günther Deschner
64421129b6
lib/util/util_pw: share sys_get{pw,gr} group of calls.
...
Guenther
2011-03-30 01:13:06 +02:00
Volker Lendecke
c07be5f747
s3: Fix Coverity ID 976: BAD_SIZEOF
2011-03-27 22:22:10 +02:00
Volker Lendecke
08e4e7fef7
s3: Fix Coverity ID 513: UNINIT
2011-03-27 22:22:10 +02:00
Volker Lendecke
f762886687
s3: Fix Coverity ID 2328: FORWARD_NULL
...
Make startsmbfilepwent robust against an invalid open type
2011-03-27 11:25:34 +02:00
Günther Deschner
ba510fae23
s3-ldapsam: fix ldapsam_create_user() with existing posix accounts.
...
We were not taking into account the existing posix attributes and thus failed
while trying to add a 2nd uid attribute.
Found by Sumit.
Guenther
2011-03-24 23:08:22 +01:00
Andrew Tridgell
15e84a9a09
charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
...
we shouldn't accept bad multi-byte strings, it just hides problems
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-24 01:47:26 +01:00
Jeremy Allison
3d6a92a37b
Fix compiler warning in debug message.
2011-03-17 10:35:10 -07:00
Volker Lendecke
4668ac8b16
s3: Fix Coverity ID 1034, CHECKED_RETURN
...
In all other places we check the result of secrets_init.
2011-03-16 21:14:58 +01:00
Volker Lendecke
9bc14afe96
s3: Fix a cut&paste error in pdb_ads_connect
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Mar 16 08:22:28 CET 2011 on sn-devel-104
2011-03-16 08:22:28 +01:00
Volker Lendecke
420be02a60
s3: Read uidNumber/gidNumber in pdb_ads_sid_to_id
...
Question: How shall we allocate those? Something like the rid allocator?
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Mar 15 09:59:55 CET 2011 on sn-devel-104
2011-03-15 09:59:55 +01:00
Volker Lendecke
16b007c223
Quite some callers of sid_split_rid do not care about the rid
2011-03-10 18:48:34 +01:00
Volker Lendecke
f6f8ec8d8b
s3: Move EXOP definitions to smbldap.h
...
This attempts to fix the build on Solaris
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 6 10:45:16 CET 2011 on sn-devel-104
2011-03-06 10:45:16 +01:00
Volker Lendecke
ae28029f67
s3: Remove an obsolete comment
2011-03-03 22:08:49 +01:00
Günther Deschner
93db9489fd
s3-libds: use already existing ../libds/common/flag_mapping.h header.
...
Guenther
2011-03-02 22:17:17 +01:00
Jelmer Vernooij
59a077d8f5
Fix some types
...
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Feb 28 23:30:06 CET 2011 on sn-devel-104
2011-02-28 23:30:06 +01:00
Jeremy Allison
f7b4209f99
Fix one more warning introduced by changing the size of UNIX_USER_TOKEN->ngroups from size_t to uint32_t.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Feb 28 22:43:50 CET 2011 on sn-devel-104
2011-02-28 22:43:50 +01:00
Gregor Beck
6710561c27
s3: add functions to remove entries from idmap memcache
2011-02-28 12:58:43 +01:00
Gregor Beck
01e7611050
s3: add functions to flush the idmap memcache
2011-02-28 12:58:37 +01:00
Volker Lendecke
cfffd0f3a0
s3: Fix pdb_ads_enum_group_memberships args
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Feb 26 11:37:10 CET 2011 on sn-devel-104
2011-02-26 11:37:10 +01:00
Volker Lendecke
56f02e8520
s3: Fix filtering in pdb_ads_search_users
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Feb 22 20:59:07 CET 2011 on sn-devel-104
2011-02-22 20:59:07 +01:00
Volker Lendecke
ecb65332ea
s3: Fix some nonempty blank lines
2011-02-22 19:18:57 +01:00
Stefan Metzmacher
d7fa349052
s3:auth: change num_groups to from size_t to uint32_t
...
This will help with the change from UNIX_USER_TOKEN to security_unix_token
metze
2011-02-22 16:20:11 +11:00
Günther Deschner
dcf23f022f
s3-pdb_ipa: remove uninitialized (and unused) status code.
...
Guenther
2011-02-21 18:03:20 +01:00
Volker Lendecke
367b35b1ff
s3: Fix pdb_ads_enum_aliasmem for empty aliases
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Feb 20 21:40:40 CET 2011 on sn-devel-104
2011-02-20 21:40:40 +01:00
Volker Lendecke
ff6c175ae6
s3: Support SetGroupInfo in pdb_ads
2011-02-20 20:50:14 +01:00
Volker Lendecke
95126034b0
s3: Fix a debug message
2011-02-20 20:50:14 +01:00
Volker Lendecke
4c45078d8f
s3: Fix pdb_ads_enum_group_members for empty groups
2011-02-20 20:50:14 +01:00
Volker Lendecke
288b396411
s3: Fix error returns in pdb_ads_mod_groupmem
2011-02-20 20:50:13 +01:00
Volker Lendecke
ac19b39577
s3: Fix return code of pdb_ads_getsamupriv if the user does not exist
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Feb 20 11:12:01 CET 2011 on sn-devel-104
2011-02-20 11:12:01 +01:00
Volker Lendecke
5f953b1ef8
s3: Add ACB_NORMAL to workstations, match RPC-SAMR
2011-02-20 10:23:29 +01:00
Volker Lendecke
351b672426
s3: Make QueryDispInfo and QueryInfo match for guest
2011-02-20 10:23:29 +01:00
Volker Lendecke
9971061a9d
s3: Pass logonHours through pdb_ads
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Feb 19 12:22:08 CET 2011 on sn-devel-104
2011-02-19 12:22:08 +01:00
Volker Lendecke
943aac2e36
s3: Add "len" to pdb_set_hours
2011-02-19 11:32:49 +01:00
Volker Lendecke
6f3008e627
s3: Let pdb_ads write accountExpires
2011-02-19 11:32:49 +01:00
Volker Lendecke
478d74fe14
s3: Fix pdb_ads_pull_time
2011-02-19 11:32:49 +01:00
Andrew Tridgell
c8b2b10976
s3-waf: use SAMBA3_*() build rules in source3/build
...
this brings the s3 waf build much closer to the proposed s3build top
level build, using the same bld.SAMBA3_*() rules
There are a few renames of subsystems in here, with a 3 suffix where
it would create a conflict.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-18 16:46:41 +11:00
Günther Deschner
67dfc87291
s3-lsa: only proceed in _lsa_EnumTrustedDomainsEx when backend has trusted domain support.
...
Guenther
2011-02-17 16:02:20 +01:00
Sumit Bose
bfa7964da8
s3-ipasam: Add aliases for trusted domain user
...
Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Feb 16 12:58:13 CET 2011 on sn-devel-104
2011-02-16 12:58:13 +01:00
Sumit Bose
d638f4a3b8
s3-lsa: Implement lsaRSetForestTrustInformation
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:06 +01:00
Sumit Bose
cc3b67fa1f
s3-ipasam: add IPA specific attributes
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:06 +01:00
Sumit Bose
8fa440c820
s3-ipasam: add pdb_ipasam_capabilities() and pdb_ipasam_get_domain_info()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:05 +01:00
Sumit Bose
72de982289
s3-ipasam: add ipasam_get_trusted_domain_by_sid()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:04 +01:00
Sumit Bose
b4bc1f8f5c
s3-ipasam: add wrapper for ipasam_enum_trusteddoms()
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:44:04 +01:00
Sumit Bose
4e60954071
s3-ipasam: implement enum_trusted_domains
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:45 +01:00
Sumit Bose
8ddbb48869
s3-ipasam: implement {get,set,del}_trusted_domain
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:45 +01:00
Sumit Bose
c96fd895b9
s3-passdb: make priv2ld() public
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:45 +01:00
Sumit Bose
b4dd65d3f9
s3-passdb: add {get,set,del,enum}_trusted_domain calls
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:44 +01:00
Sumit Bose
2e78022066
s3-ipasam: Disable old trustdom_pw calls
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:44 +01:00
Sumit Bose
4fa210d76a
s3-passdb: Add minimal stub for IPA passdb backend
...
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-16 11:34:31 +01:00
Volker Lendecke
ab85362cff
s3: Support "codePage" in pdb_ads
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Feb 15 22:00:27 CET 2011 on sn-devel-104
2011-02-15 22:00:27 +01:00
Volker Lendecke
ead7ffa1a7
s3: Add "code_page" to struct samu
2011-02-15 21:12:22 +01:00
Volker Lendecke
8bbf0ad2a0
s3: Support "country_code" in pdb_ads
2011-02-15 21:12:22 +01:00
Volker Lendecke
d9d0fef862
s3: Add "country_code" to struct samu
2011-02-15 21:12:22 +01:00
Volker Lendecke
7a2cbdafa8
s3: Add userWorkstations and userParameters to pdb_ads
2011-02-15 21:12:22 +01:00
Günther Deschner
a32f0ff2f0
s3-waf: TLDAP is only needed by pdb_ads (and smbtorture).
...
Guenther
2011-02-15 12:09:22 +01:00
Volker Lendecke
5d63c503f7
s3: Add "comment" and "description" to pdb_ads
...
This is pending a change to samldb_description_check, we might have to modify
the description with a TLDAP_MOD_REPLACE operation.
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Feb 13 17:56:58 CET 2011 on sn-devel-104
2011-02-13 17:56:58 +01:00
Volker Lendecke
60df3c0679
s3: Make "net sam list [users|workstations]" list only the right things
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Feb 13 12:59:14 CET 2011 on sn-devel-104
2011-02-13 12:59:14 +01:00
Volker Lendecke
f49ad6d073
s3: Remove an unneeded proto
2011-02-13 12:11:53 +01:00
Volker Lendecke
9331bc378d
s3: Fix some nonempty blank lines
2011-02-13 12:11:53 +01:00
Volker Lendecke
fe551d6815
s3: Convert tldap_entry_values args to "array, count"
2011-02-13 12:11:53 +01:00
Volker Lendecke
84abb428f6
s3: Add an explicit counter to tldap_add_mod_[blobs|str]
2011-02-13 12:11:53 +01:00
Volker Lendecke
158c1e315b
s3: Convert tldap_make_mod_fmt args to "array, count"
2011-02-13 12:11:52 +01:00
Volker Lendecke
6b492a1741
s3: Convert tldap_add_mod_blobs args to "array, count"
2011-02-13 12:11:52 +01:00
Volker Lendecke
30e72e0d0a
s3: Align the args of pdb_ads_update_sam_account to tldap_modify
2011-02-13 12:11:52 +01:00
Volker Lendecke
d38ab83bab
s3: Make "smbpasswd <user>" work with pdb_ads
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Feb 12 15:17:39 CET 2011 on sn-devel-104
2011-02-12 15:17:39 +01:00
Günther Deschner
8015514c5b
s3-waf: use bld.env.HAVE_LDAP in some more places, hopefully fixes the builds w/o ldap.
...
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Feb 11 13:08:38 CET 2011 on sn-devel-104
2011-02-11 13:08:38 +01:00
Volker Lendecke
efa460e291
s3: Align the args in tldap_modify
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Feb 10 23:20:05 CET 2011 on sn-devel-104
2011-02-10 23:20:05 +01:00
Volker Lendecke
b524e58f9a
s3: Align tldap_add and tldap_add_send
2011-02-10 22:34:01 +01:00
Volker Lendecke
0539ca51ab
s3: Add primary group in pdb_ads_enum_group_memberships
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Feb 6 18:41:08 CET 2011 on sn-devel-104
2011-02-06 18:41:08 +01:00
Volker Lendecke
d515c6cd5c
s3: Fix auth_netlogond to cope with netlogon_creds_CredentialState
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Feb 6 17:30:48 CET 2011 on sn-devel-104
2011-02-06 17:30:48 +01:00
Volker Lendecke
47d07df37f
s3: Fix a potential memleak in secrets_fetch_trusted_domain_password
2011-02-06 16:44:56 +01:00
Volker Lendecke
8c367162f0
s3: In pdb_ads, cope with artificial samu structs
2011-02-06 16:44:56 +01:00
Volker Lendecke
08f2a8562f
s3: Use strlcpy in pdb_ads_connect
2011-02-06 16:44:56 +01:00
Andreas Schneider
ad65605643
s3-auth: Fixed account lockout check.
2011-01-17 16:50:50 +01:00
Bjoern Baumbach
6acbcd1b0c
Make sure that user exists after running add user script before adding sam account.
...
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Dec 7 17:37:52 CET 2010 on sn-devel-104
2010-12-07 17:37:52 +01:00
Günther Deschner
133a2ffd00
s3-waf: avoid module name uppercasing.
...
This finally allows mixed case module names like the classic build
(./configure --shared_modules=charset_CP850)
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec 1 18:39:14 CET 2010 on sn-devel-104
2010-12-01 18:39:14 +01:00
Jeremy Allison
e1cfca1e2e
Make getpwnam_alloc() static to lib/username.c, and ensure all username lookups go
...
through Get_Pwnam_alloc(), which is the correct wrapper function. We were using
it *some* of the time anyway, so this just makes us properly consistent.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 20 16:02:12 UTC 2010 on sn-devel-104
2010-10-20 16:02:12 +00:00
Günther Deschner
10f95a4f1a
s3-waf: fix pdb modules build.
...
Guenther
2010-10-18 15:57:03 +02:00
Andrew Bartlett
f768b32e37
libcli/security Provide a common, top level libcli/security/security.h
...
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.
This includes (along with other security headers) dom_sid.h and
security_token.h
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Volker Lendecke
41b54a8931
s3: Remove talloc_autofree_context from pdb_interface
...
None of the pdb backends have special destructors that need to be run at
program exit.
2010-10-03 10:45:56 +02:00
Günther Deschner
b894847ca0
s3-waf: rework CLDAP and LIBCLI_LDAP subsystems.
...
Guenther
2010-09-27 00:39:38 +02:00
Günther Deschner
d7d33317c7
s3-waf: move pdb subsystem to pdb/wscript_build.
...
Guenther
2010-09-27 00:39:37 +02:00
Volker Lendecke
d4bfb5c488
s3: Remove talloc_autofree_context() from guest_user_info()
...
pwd is freed a few lines down
2010-09-26 17:36:40 +02:00
Volker Lendecke
2b601d72d5
s3: Remove talloc_autofree_context() from lookup_unix_user_name()
...
pwd is freed in this routine immediately
2010-09-26 03:29:28 +02:00
Volker Lendecke
9b2d3142c1
s3: Remove talloc_autofree_context() from pdb_init_ads()
2010-09-26 03:29:28 +02:00
Andrew Bartlett
d7bc452a89
s3: Replace sid_binstring and sid_guidstring with PIDL-based alternatives
...
This reduces the manual marshalling of these structures by removing
the duplication here.
Andrew Bartlett
Signed-off-by: Günther Deschner <gd@samba.org>
2010-09-20 16:15:03 -07:00
Günther Deschner
4dbd743e46
s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
...
Guenther
2010-09-20 14:04:37 -07:00
Andrew Bartlett
4bf783d4d6
s3-auth Change type of num_sids to uint32_t
...
size_t is overkill here, and in struct security_token in the num_sids
is uint32_t.
This includes a change to the prototype of add_sid_to_array()
and add_sid_to_array_unique(), which has had a number of
consequnetial changes as I try to sort out all the callers using
a pointer to the number of sids.
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:05 +10:00
Andreas Schneider
c5cfad142c
s3-passdb: Try to unlock the account if it is locked out.
...
Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-30 10:43:41 -04:00
Andreas Schneider
2ab0b63bd8
s3-passdb: Added a pdb_try_account_unlock function.
...
The function checks if the account has been autolocked. If we have a
lockout_duration and a bad password time it checks if we can unlock the
account.
Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-30 10:43:34 -04:00
Günther Deschner
7a05ca2c9c
s3-build: use dbwrap.h only where needed.
...
Guenther
2010-08-26 00:25:55 +02:00
Günther Deschner
2b41f421fd
s3-idmap: only include idmap headers where needed.
...
Guenther
2010-08-26 00:20:29 +02:00
Günther Deschner
7ff7eb0b52
s3-build: only include nsswitch header where needed.
...
Guenther
2010-08-26 00:20:28 +02:00
Günther Deschner
aba1bf4b5e
s3-build: only include memcache.h where needed.
...
Guenther
2010-08-26 00:20:28 +02:00
Michael Adam
c45eca5751
s3:pdb_ldap: move some code in ldapsam_create_dom_group()
...
to make the flow more similar to ldapsam_create_user().
This prepares for calling winbind_sid_to_gid() instead of
winbind_allocate_gid(): we need the group_sid for this...
Michael
2010-08-14 02:10:30 +02:00
Günther Deschner
ae36783c7b
s3-passdb: include samr.h where needed.
...
Guenther
2010-08-06 15:43:37 +02:00
Günther Deschner
c136b84f0d
s3-secrets: only include secrets.h when needed.
...
Guenther
2010-08-05 10:12:25 +02:00
Volker Lendecke
c186f92437
s3: [ug]id_to_unix_... can not fail
...
Remove some silly failure checks
2010-07-11 17:33:34 +02:00
Björn Jacke
a679319192
s3:pdb_ldap: change LDAP password before samba password hashes
...
this way we can catch up with password change refuses from ldap password policy
overlays and abort the password change early.
Thanks to Andy Hanton <andyhanton@gmail.com> for the initial patch.
2010-07-06 18:50:01 +02:00
Volker Lendecke
a56c688366
s3: Fix another aspect of bug 7262 and make paged results work again
2010-07-06 17:36:18 +02:00
Volker Lendecke
3278554b3e
s3: Make talloc_attrs() static
2010-07-05 12:37:13 +02:00
Günther Deschner
dff7be8ccb
s3-libads: only include libds flags where needed.
...
Guenther
2010-07-01 23:20:40 +02:00
Andreas Schneider
ac5600fc7e
s3-passdb: Make sure dn is initialized and don't free it.
...
dn is just a pointer to a memory which hasn't been duplicated.
Found by clang-analyzer.
2010-06-28 12:56:13 +02:00
Andreas Schneider
6d89116afe
s3-passdb: Make sure we don't call free on a garbage pointer.
...
Found by clang-analyzer.
2010-06-28 12:56:13 +02:00
Andreas Schneider
a81b97ff34
s3-passdb: Make sure that we don't assign garbage.
2010-06-28 10:18:12 +02:00
Volker Lendecke
f66cc82709
s3: Fix EnumDomainAliases when no aliases are in LDAP
...
We used to return NT_STATUS_ACCESS_DENIED, now we just return 0 entries, just
like W2k8 does.
usrmgr.exe was pretty unhappy with the NT_STATUS_ACCESS_DENIED
2010-06-10 15:28:26 +02:00
Michael Adam
ba809ecb8a
s3:pdb_ldap: fix bug 7505 - init_sam_from_ldap stores group in sid2uid cache
2010-06-10 12:02:05 +02:00
Karolin Seeger
8ca88e2f81
s3-passdb: Fix typo in comment.
...
Karolin
2010-06-10 10:34:58 +02:00
Volker Lendecke
1fd15dcb7c
s3: Fix bug 7253
...
acct_ctrl is 32 bit in LOGIN_CACHE, but "w" as a format specifier for
tdb_unpack only writes 16 bits. Okay on x86, not okay on Solaris.
Thanks to Vladimir.Marek@Sun.COM !
Volker
2010-06-09 10:27:17 +02:00
Simo Sorce
0a7ff14617
s3:passdb Export function to calculate the proper primary group sid
...
Don't keep it buried in passdb, this function need to be available
for use in places where we do not want to construct an artificial
samu struct just to play tricks.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-06-07 22:53:08 +10:00
Matthieu Patou
57ab910b6f
s3: Allow previous password to be stored and use it to check tickets
...
This patch is to fix bug 7099. It stores the current password in the
previous password key when the password is changed. It also check the
user ticket against previous password.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-06-02 14:32:23 +02:00
Günther Deschner
f9f8007361
s3-build: only use ndr_security.h where needed.
...
Guenther
2010-05-31 11:32:37 +02:00
Simo Sorce
d85d85b851
s3:passdb Fix memory leak
...
We were allocating this passwd structure on sampass, but never freeing
it nor assigning it to unix_pw where it could be reused.
2010-05-29 10:54:08 -04:00
Andrew Bartlett
cba7f8b827
s3:dom_sid Global replace of DOM_SID with struct dom_sid
...
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.
Andrew Bartlett
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Andrew Bartlett
a92b653af9
s3:passdb Remove use of uint8 uint16 and uint32 in favour of C99 types
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:24:55 +02:00