Andrew Tridgell [Tue, 6 Jul 2010 03:21:54 +0000 (13:21 +1000)]
s4-dsdb: use ldb_operr() in the dsdb code
this replaces "return LDB_ERR_OPERATIONS_ERROR" with "return ldb_operr(ldb)"
in places in the dsdb code where we don't already explicitly set an
error string. This should make is much easier to track down dsdb
module bugs that result in an operations error.
Andrew Tridgell [Tue, 6 Jul 2010 03:20:19 +0000 (13:20 +1000)]
s4-ldb: added ldb_error() and ldb_operr()
These will be used to help avoid the problem we have with hundreds of
places that do "return LDB_ERR_OPERATIONS_ERROR" without an
explanation. It is very difficult to track down ldb errors which don't
have any explanation.
By replacing "return LDB_ERR_OPERATIONS_ERROR;" with "return ldb_operr(ldb);"
we at least get a file:line message in the ldb error string. It isn't
an ideal error message, but it is much better than just "operations
error"
This change also makes ldb_oom() return the error code
(LDB_ERR_OPERATIONS_ERROR) so you can do:
return ldb_oom(ldb);
instead of:
ldb_oom(ldb);
return LDB_ERR_OPERATIONS_ERROR;
Kai Blin [Fri, 2 Jul 2010 20:35:28 +0000 (22:35 +0200)]
s3 build: Fix *netgrent prototype detection on opensolaris
Andrew Tridgell [Tue, 6 Jul 2010 05:36:21 +0000 (15:36 +1000)]
s4-ldb: added support for simple binds on ldb_ldap backend
this uses the options[] array to pass in bindMech, bindID and
bindSecret. Currently only "simple" is supported.
Andrew Tridgell [Tue, 6 Jul 2010 05:35:16 +0000 (15:35 +1000)]
s4-ldb: added ldb_options_find()
ldb_options_find() allows backends to find options in the options[]
array passed to the connect operation.
This will be used by the ldb_ldap bind code
Steven Danneman [Mon, 28 Jun 2010 23:06:33 +0000 (16:06 -0700)]
s4:libcli: Modify S4 client library to check for proper CN alignment
MS-CIFS 2.2.7.4.2 states that FILE_NOTIFY_INFORMATION structures in
change notify replies must be aligned to 4-byte boundaries.
This updates s4 client to check for this restriction and also adds a
torture test which should tickle a server into giving unaligned
structures if it doesn't follow the spec.
Chere Zhou [Tue, 6 Jul 2010 00:18:35 +0000 (17:18 -0700)]
s3:smbd: Align change notify replies on 4-byte boundary
MS-CIFS section 2.2.7.4.2 states this is mandatory. WinXP clients
don't seem to care, but a Win7 client will send an immediate Close()
to the directory handle when receiving an incorrectly aligned
change notify response.
Matthias Dieter Wallnöfer [Tue, 6 Jul 2010 15:51:00 +0000 (17:51 +0200)]
s4:new_partition LDB module - fix an uninitalised variable warning
> [ 651/1946] Compiling dsdb/samdb/ldb_modules/new_partition.c
> ../dsdb/samdb/ldb_modules/new_partition.c: In function 'new_partition_add':
> ../dsdb/samdb/ldb_modules/new_partition.c:195: warning: 'down_req' may be used uninitialized in this function
The "down_req" variable isn't used anymore.
Matthias Dieter Wallnöfer [Mon, 5 Jul 2010 15:42:40 +0000 (17:42 +0200)]
s4:SAMR rpc server - "SetUserInfo" - fix the implementation of the expire flag
It has to consider the "password_expires" flag to known if the "pwdLastSet" has
to be updated or to be resetted.
Matthias Dieter Wallnöfer [Mon, 5 Jul 2010 13:54:21 +0000 (15:54 +0200)]
s4:SAMR rpc server - "QueryUserInfo" - send back the password expired flag on level 21
Taken from the s3 server code
Matthias Dieter Wallnöfer [Mon, 5 Jul 2010 14:55:50 +0000 (16:55 +0200)]
s4:dsdb - samdb_result_force_password_change - also when "pwdLastSet" is "-1" we shouldn't force a password change
This value is set by the ADUC console.
Günther Deschner [Tue, 6 Jul 2010 17:53:37 +0000 (19:53 +0200)]
s3-selftest: add "make testenv" target to Makefile.
Guenther
Björn Jacke [Tue, 6 Jul 2010 16:39:26 +0000 (18:39 +0200)]
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.
Andreas Schneider [Tue, 6 Jul 2010 12:56:50 +0000 (14:56 +0200)]
s3-winbind: Handle aliases in rpc_lookup_groupmem().
Günther Deschner [Tue, 6 Jul 2010 10:50:48 +0000 (12:50 +0200)]
s3-winbind: Fixed the winbind caching.
Andreas Schneider [Tue, 6 Jul 2010 08:58:46 +0000 (10:58 +0200)]
s3-winbind: Use same format for all msrpc debug messages.
Andreas Schneider [Tue, 6 Jul 2010 08:53:01 +0000 (10:53 +0200)]
s3-winbind: Fixed debug messages of open_internal_lsa_pipe().
Andreas Schneider [Tue, 6 Jul 2010 13:33:50 +0000 (15:33 +0200)]
s3-winbind: Make sure that the policy handles are closed.
Andreas Schneider [Mon, 5 Jul 2010 23:05:39 +0000 (01:05 +0200)]
s3-winbind: Make sure we close all policy handles in sam.
Andreas Schneider [Mon, 5 Jul 2010 17:43:25 +0000 (19:43 +0200)]
s3-winbind: Create all logfiles in the same directory.
If log file is set in the config file, we should create the log files of
the winbind child processes in the same directory.
Volker Lendecke [Tue, 6 Jul 2010 14:55:14 +0000 (16:55 +0200)]
s3: Fix another aspect of bug 7262 and make paged results work again
Sumit Bose [Tue, 6 Jul 2010 18:55:32 +0000 (14:55 -0400)]
s4:rpc_server/lsa/dcesrv_lsa.c - fix typo
Signed-off-by: Günther Deschner <gd@samba.org>
Volker Lendecke [Tue, 6 Jul 2010 13:07:05 +0000 (15:07 +0200)]
s3: Fix a segfault in the RPC server
After converting the rpc infratructure to talloc, read_from_internal_pipe freed
the outdata too early. If the last fragment was read in two pieces (as
rpcclient does it), all the outdata was freed during the read of the first
piece of the read of the last fragment. Later read&x calls, trying to read the
rest of the last fragment stepped into p->out_data.frag with non-zero offset
when this was already freed.
Volker Lendecke [Tue, 6 Jul 2010 09:54:31 +0000 (11:54 +0200)]
s3: Fix another winbind crash
This is similar to
09a9cc3, this re-arranges winbindd_ads.c:query_user_list()
so that "ads" is not accessed anymore across a call to nss_get_info_cached()
call which can destroy it behind the scenes.
Günther Deschner [Mon, 5 Jul 2010 15:34:19 +0000 (17:34 +0200)]
pidl: s3 server stubs: make sure LIBNDR_FLAG_BIGENDIAN is set when negotiated.
Guenther
Günther Deschner [Mon, 5 Jul 2010 14:39:44 +0000 (16:39 +0200)]
s4-smbtorture: add my (C) to rap torture lib.
Guenther
Stefan Metzmacher [Wed, 30 Jun 2010 06:26:08 +0000 (08:26 +0200)]
s4:dsdb/password_hash: implement DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID
metze
Stefan Metzmacher [Wed, 30 Jun 2010 06:24:35 +0000 (08:24 +0200)]
s4:dsdb: allocate DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID
When importing users from Samba3 we need to control all values.
metze
Stefan Metzmacher [Wed, 30 Jun 2010 10:08:30 +0000 (12:08 +0200)]
s4:dsdb/password_hash: fix some c++ compiler warnings
metze
Zahari Zahariev [Mon, 5 Jul 2010 14:55:11 +0000 (17:55 +0300)]
DNS objects should not be ignored
Recently I have found that after vampireing from a clean Windows
server we have the same DNS objects in the ldb. So ldapcmp has to
no longer ignore them.
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Günther Deschner [Mon, 5 Jul 2010 15:38:16 +0000 (17:38 +0200)]
s3-waf: fix the build.
Guenther
Andreas Schneider [Mon, 21 Jun 2010 09:15:18 +0000 (11:15 +0200)]
s3-winbind: Rename lookup_groupmem to msrpc_lookup_groupmem.
Andreas Schneider [Mon, 21 Jun 2010 09:14:12 +0000 (11:14 +0200)]
s3-winbind: Use rpc_trusted_domains in msrpc.
Andreas Schneider [Mon, 21 Jun 2010 09:13:50 +0000 (11:13 +0200)]
s3-winbind: Use rpc_trusted_domains in samr.
Andreas Schneider [Mon, 21 Jun 2010 09:13:25 +0000 (11:13 +0200)]
s3-winbind: Added a common rpc_trusted_domains function.
Andreas Schneider [Mon, 21 Jun 2010 08:54:53 +0000 (10:54 +0200)]
s3-winbind: Rename common_password_policy to sam_password_policy.
Andreas Schneider [Mon, 21 Jun 2010 08:53:15 +0000 (10:53 +0200)]
s3-winbind: Rename common_lockout_policy to sam_lockout_policy.
Andreas Schneider [Mon, 21 Jun 2010 08:48:15 +0000 (10:48 +0200)]
s3-winbind: Use rpc_sequence_number in msrpc.
Andreas Schneider [Mon, 21 Jun 2010 08:47:54 +0000 (10:47 +0200)]
s3-winbind: Use rpc_sequence_number in samr.
Andreas Schneider [Mon, 21 Jun 2010 08:47:22 +0000 (10:47 +0200)]
s3-winbind: Added a common rpc_sequence_number function.
Andreas Schneider [Mon, 21 Jun 2010 08:28:47 +0000 (10:28 +0200)]
s3-winbind: Use rpc_lookup_groupmem in samr.
Andreas Schneider [Mon, 21 Jun 2010 08:28:21 +0000 (10:28 +0200)]
s3-winbind: Added a common rpc_lookup_groupmem function.
Andreas Schneider [Fri, 18 Jun 2010 17:08:41 +0000 (19:08 +0200)]
s3-winbind: Use rpc_lookup_useraliases in msrpc.
Andreas Schneider [Fri, 18 Jun 2010 17:08:28 +0000 (19:08 +0200)]
s3-winbind: Use rpc_lookup_useraliases in samr.
Andreas Schneider [Fri, 18 Jun 2010 17:07:43 +0000 (19:07 +0200)]
s3-winbind: Added a common rpc_lookup_useraliases function.
Andreas Schneider [Fri, 18 Jun 2010 16:20:12 +0000 (18:20 +0200)]
s3-winbind: Use rpc_lookup_usergroups in msrpc.
Andreas Schneider [Fri, 18 Jun 2010 16:19:50 +0000 (18:19 +0200)]
s3-winbind: Use rpc_lookup_usergroups in samr.
Andreas Schneider [Fri, 18 Jun 2010 16:19:16 +0000 (18:19 +0200)]
s3-winbind: Added a common rpc_lookup_usergroups function.
Andreas Schneider [Fri, 18 Jun 2010 15:48:17 +0000 (17:48 +0200)]
s3-winbind: Use rpc_query_user in samr.
Andreas Schneider [Fri, 18 Jun 2010 15:47:47 +0000 (17:47 +0200)]
s3-winbind: Use rpc_query_user in msrpc.
Andreas Schneider [Fri, 18 Jun 2010 15:47:16 +0000 (17:47 +0200)]
s3-winbind: Added a common rpc_query_user function.
Andreas Schneider [Thu, 17 Jun 2010 17:32:18 +0000 (19:32 +0200)]
s3-winbind: Use rpc_rids_to_names in samr.
Andreas Schneider [Thu, 17 Jun 2010 17:31:51 +0000 (19:31 +0200)]
s3-winbind: Added a common rpc_rids_to_names function.
Andreas Schneider [Thu, 17 Jun 2010 14:25:33 +0000 (16:25 +0200)]
s3-winbind: Use rpc_sid_to_name in samr.
Andreas Schneider [Thu, 17 Jun 2010 14:25:07 +0000 (16:25 +0200)]
s3-winbind: Added a common rpc_sid_to_name function.
Andreas Schneider [Thu, 17 Jun 2010 14:07:02 +0000 (16:07 +0200)]
s3-winbind: Use rpc_name_to_sid in samr.
Andreas Schneider [Thu, 17 Jun 2010 14:06:34 +0000 (16:06 +0200)]
s3-winbind: Added a common rpc_name_to_sid function.
Andreas Schneider [Thu, 17 Jun 2010 13:53:06 +0000 (15:53 +0200)]
s3-winbind: Use rpc_enum_local_groups in samr.
Andreas Schneider [Thu, 17 Jun 2010 13:52:44 +0000 (15:52 +0200)]
s3-winbind: Use rpc_enum_local_groups in msrpc.
Andreas Schneider [Thu, 17 Jun 2010 13:51:58 +0000 (15:51 +0200)]
s3-winbind: Added a common rpc_enum_local_groups function.
Andreas Schneider [Thu, 17 Jun 2010 12:55:19 +0000 (14:55 +0200)]
s3-winbind: Use rpc_query_user_list in samr.
Andreas Schneider [Thu, 17 Jun 2010 12:54:55 +0000 (14:54 +0200)]
s3-winbind: Use rpc_query_user_list in msrpc.
Andreas Schneider [Thu, 17 Jun 2010 12:54:02 +0000 (14:54 +0200)]
s3-winbind: Added a common rpc_query_user_list function.
Andreas Schneider [Thu, 17 Jun 2010 11:57:12 +0000 (13:57 +0200)]
s3-winbind: Use rpc_enum_dom_groups in samr.
Andreas Schneider [Thu, 17 Jun 2010 11:56:54 +0000 (13:56 +0200)]
s3-winbind: Use rpc_enum_dom_groups in msrpc.
Andreas Schneider [Wed, 16 Jun 2010 19:15:54 +0000 (21:15 +0200)]
s3-winbind: Added a common rpc_enum_dom_groups function.
Andreas Schneider [Wed, 16 Jun 2010 15:43:57 +0000 (17:43 +0200)]
s3-winbind: Rename winbindd_rpc.c to winbindd_msrpc.c.
Andreas Schneider [Wed, 9 Jun 2010 14:44:02 +0000 (16:44 +0200)]
s3-winbind: Replace the passdb backend with a samr/lsa based backend.
Andreas Schneider [Wed, 9 Jun 2010 13:20:13 +0000 (15:20 +0200)]
s3-winbind: Implemented samr backend function common_sequence_number.
Andreas Schneider [Wed, 9 Jun 2010 13:12:37 +0000 (15:12 +0200)]
s3-winbind: Implemented samr backend function common_lookup_useraliases.
Andreas Schneider [Wed, 9 Jun 2010 12:57:15 +0000 (14:57 +0200)]
s3-winbind: Implemented samr backend function common_lookup_usergroups.
Andreas Schneider [Wed, 9 Jun 2010 12:41:54 +0000 (14:41 +0200)]
s3-winbind: Implemented samr backend function common_password_policy.
Andreas Schneider [Wed, 9 Jun 2010 12:39:55 +0000 (14:39 +0200)]
s3-winbind: Implemented samr backend function common_lockout_policy.
Andreas Schneider [Wed, 9 Jun 2010 12:33:02 +0000 (14:33 +0200)]
s3-winbind: Implemented samr backend function common_rids_to_names.
Andreas Schneider [Wed, 9 Jun 2010 09:52:26 +0000 (11:52 +0200)]
s3-winbind: Implemented samr backend function common_sid_to_name.
Andreas Schneider [Tue, 8 Jun 2010 12:42:59 +0000 (14:42 +0200)]
s3-winbind: Implemented samr backend function common_name_to_sid.
Andreas Schneider [Tue, 8 Jun 2010 06:47:13 +0000 (08:47 +0200)]
s3-winbind: Implemented samr backend function common_enum_local_groups.
Andreas Schneider [Mon, 7 Jun 2010 20:15:37 +0000 (22:15 +0200)]
s3-winbind: Implemented samr backend function sam_lookup_groupmem.
Andreas Schneider [Mon, 7 Jun 2010 19:46:02 +0000 (21:46 +0200)]
s3-winbind: Implemented samr backend function sam_trusted_domains.
Andreas Schneider [Mon, 7 Jun 2010 19:20:15 +0000 (21:20 +0200)]
s3-winbind: Implemented samr backend function sam_query_user.
Andreas Schneider [Mon, 7 Jun 2010 14:39:44 +0000 (16:39 +0200)]
s3-winbind: Implemented samr backend function sam_enum_dom_groups.
Andreas Schneider [Mon, 7 Jun 2010 14:18:12 +0000 (16:18 +0200)]
s3-winbind: Implemented samr backend function sam_query_user_list.
Andreas Schneider [Mon, 7 Jun 2010 08:18:01 +0000 (10:18 +0200)]
s3-winbind: Added a skeleton for samr based functions.
The goal is to replace the passdb backend later.
Andreas Schneider [Thu, 27 May 2010 10:06:24 +0000 (12:06 +0200)]
s3-winbind: Initialize the server_info on winbindd start.
Andreas Schneider [Fri, 11 Jun 2010 09:48:37 +0000 (11:48 +0200)]
s3-rpc_client: Use the right memory context for array elements.
Andreas Schneider [Mon, 14 Jun 2010 09:49:32 +0000 (11:49 +0200)]
s3-winbind: Free some memory which isn't needed anymore.
Günther Deschner [Mon, 5 Jul 2010 13:24:55 +0000 (15:24 +0200)]
s3-build: add idl_full to Makefile.
Guenther
Günther Deschner [Mon, 5 Jul 2010 13:24:27 +0000 (15:24 +0200)]
s3-idl: support --full for s3 build_idl.sh as well.
Guenther
Matthias Dieter Wallnöfer [Mon, 5 Jul 2010 13:19:31 +0000 (15:19 +0200)]
s4:include/smbldap.h - introduce a placeholder for "LDAPMessage" if we don't link against a LDAP library
Matthias Dieter Wallnöfer [Mon, 5 Jul 2010 09:44:48 +0000 (11:44 +0200)]
s4:winbind/wb_cmd_setpwent.c - fix a possible crash condition in the "winbind struct test"
Use a "talloc_strdup" for duplicating usernames.
Matthias Dieter Wallnöfer [Sun, 4 Jul 2010 21:21:07 +0000 (23:21 +0200)]
s4:samr RPC server - "SetUserInfo" - allow some more informations to be set
Taken from the s3 implementation.
Matthias Dieter Wallnöfer [Sun, 4 Jul 2010 20:34:43 +0000 (22:34 +0200)]
samr.idl:UserInfo structures - fix some names according to MS-SAMR documentation
See MS-SAMR section "FULL IDL"
Volker Lendecke [Mon, 5 Jul 2010 10:36:19 +0000 (12:36 +0200)]
s3: Make talloc_attrs() static
Volker Lendecke [Sun, 4 Jul 2010 19:53:52 +0000 (21:53 +0200)]
s3: Remove procid_self() from srv_spoolss_reply[open|close]printer()
Volker Lendecke [Sun, 4 Jul 2010 18:50:11 +0000 (20:50 +0200)]
s3: Remove procid_self() from ctdb_read_req() and ctdb_handle_message()
Volker Lendecke [Sun, 4 Jul 2010 18:49:43 +0000 (20:49 +0200)]
s3: Remove some type-punned warnings
Volker Lendecke [Sun, 4 Jul 2010 18:31:02 +0000 (20:31 +0200)]
s3: Put serverid_key and serverid_data together
Volker Lendecke [Sun, 4 Jul 2010 18:20:44 +0000 (20:20 +0200)]
s3: Remove procid_self() from brl_close_fnum()
Volker Lendecke [Sun, 4 Jul 2010 18:18:29 +0000 (20:18 +0200)]
s3: Remove procid_self() from srv_spoolss_drv_upgrade_printer()
Volker Lendecke [Sun, 4 Jul 2010 18:17:32 +0000 (20:17 +0200)]
s3: Remove procid_self() from cancel_pending_lock_requests_by_fid_smb2()