1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-30 13:18:05 +03:00
Commit Graph

308 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
9442a5593d s4:samr RPC - Change some counters to be "unsigned" where needed
The "count" size specifiers I typed "uint32_t" since they're often returned as
an "uint32_t" (consider the IDL file). LDB counters need to be "signed" if they
count till a limit of a "gendb*" call or "unsigned" if they count directly the
number of objects.
2010-03-06 10:44:33 +01:00
Matthias Dieter Wallnöfer
ce296d2a53 s4:dcesrv_samr_AddAliasMember - wrap a long "DEBUG" statement 2010-03-05 15:01:07 +01:00
Matthias Dieter Wallnöfer
8d0fbfe987 s4:dcesrv_samr - Also "OpenGroup" needs to support universal groups 2010-03-03 17:15:31 +01:00
Matthias Dieter Wallnöfer
f92c28bf4e s4:dcesrv_samr - Fix up "EnumDomainGroups" and "QueryDisplayInfo" calls
We need to look for both global and universal group types when querying them.
Found by ekacnet (http://lists.samba.org/archive/samba-technical/2010-March/069777.html).
2010-03-03 17:15:31 +01:00
Matthias Dieter Wallnöfer
e0e549a770 s4:dcesrv_samr.c - Remove unused variable 2010-02-26 11:54:45 +01:00
Andrew Tridgell
90203f87e7 s4-dsdb: change samdb_replace() to dsdb_replace() and allow for dsdb_flags
This allows for controls to be added easily where they are needed.
2010-02-16 21:10:50 +11:00
Andrew Tridgell
f954f522a4 s4-rpcserver: use TYPESAFE_QSORT() in rpc servers 2010-02-13 22:36:12 +11:00
Michael Adam
fb4679638d s4:rpc-server:samr: fix setting of lockout duration < lockout window
This should return NT_STATUS_INVALID_PARAMETER.
This makes samba pass the first part of the samr-lockout test.

This constraint is documented here for the samr server:
http://msdn.microsoft.com/en-us/library/cc245667%28PROT.10%29.aspx
MS-SAMR 3.1.1.6 Attribute Constraints for Originating Updates

and here for the ldap backend:
http://msdn.microsoft.com/en-us/library/cc223462(PROT.10).aspx
MS-ADTS 3.1.1.5.3.2 Constraints

So the check should actually be moved down into the backend,
i.e. under dsdb/samdb/ldb_modules - TODO..

Michael
2010-01-21 13:01:24 +01:00
Matthias Dieter Wallnöfer
40bc48dfa9 s4:SAMR RPC - Fix the criteria for group searches
This should match the MS-SAMR documentation (section 3.1.5.5.1.1)
2010-01-14 10:58:06 +01:00
Andrew Tridgell
ced3eef776 s4-drsutil: fixed a memory leak in samdb_search_count
In general functions that don't return any memory should not take a memory context.
Otherwise it is too easy to have a bug like this where memory is leaked
2009-12-04 17:49:19 +11:00
Matthias Dieter Wallnöfer
7d5367fc99 s4:samr RPC - Use more LDB constants 2009-11-21 19:53:37 +01:00
Matthias Dieter Wallnöfer
fd4061dadd s4:dcesrv_samr - Add more checks for invalid levels
Add more checks on valid levels, mark unimplemented ones as "UNSUPPORTED" and
otherwise as "INVALID_INFO_CLASS" to be safe.
2009-11-10 16:26:23 +01:00
Matthias Dieter Wallnöfer
c9df4a3c28 s4:dcesrv_samr_ValidatePassword - naturally this was only for debugging the failure 2009-11-06 15:21:56 +01:00
Matthias Dieter Wallnöfer
7cf98abd03 s4:dcesrv_samr_ValidatePassword - adapt call to "samdb_check_password"
I've forgotten that PIDL converts UTF16 parameters automatically back to the
UNIX charset (in most cases UTF16). So I don't have to do this here.
2009-11-06 15:19:40 +01:00
Matthias Dieter Wallnöfer
6afee5f130 s4:dcesrv_samr_ValidatePassword - I forgot to create an out buffer 2009-11-06 15:19:39 +01:00
Matthias Dieter Wallnöfer
3372e2a0cc s4:dcesrv_samr - Implement "dcesrv_samr_ValidatePassword" using my new check password call
This implements a very basic method for password validation using my new
"samdb_check_password" call.
2009-11-05 12:43:03 +01:00
Stefan Metzmacher
a07eb08870 s4:dcesrv_samr: always use mem_ctx as initial parent for samr_*_state
We always steal the state to the policy handle on success,
but untill then keep it on the short term context.

metze
2009-10-24 11:59:16 +02:00
Andrew Tridgell
4ad0397d8a s4-ldbwrap: added re-use of ldb contexts in ldb_wrap_connect()
This allows us to reuse a ldb context if it is open twice, instead
of going through the expensive process of a full ldb open. We can
reuse it if all of the parameters are the same.

The change relies on callers using talloc_unlink() or free of a parent
to close a ldb context.
2009-10-23 14:52:17 +11:00
Andrew Tridgell
98e4393df9 s4-dsdb: create a static system_session context
This patch adds a system_session cache, preventing us from having to
recreate it on every ldb open, and allowing us to detect when the same
session is being used in ldb_wrap
2009-10-23 14:52:17 +11:00
Andrew Bartlett
a0a787ad78 s4:rpc_server Ensure we talloc_free handles when we delete objects
If we don't talloc_free the handle, we leak the memory onto the long-term
context.

Andrew Bartlett
2009-10-21 22:43:56 +11:00
Andrew Bartlett
fcbe6163f6 s4:samr Don't leak the whole user onto the long-term handle
The user entry is only required for this function, so use
mem_ctx to hold it.

Andrew Bartlett
2009-10-21 22:43:56 +11:00
Matthias Dieter Wallnöfer
c183acc782 s4:dcesrv_samr - add another constant 2009-10-13 17:29:52 +02:00
Matthias Dieter Wallnöfer
6b91a2ad8e s4:dcesrv_samr - prevent "ldb_modify" on a possibly empty message
In this code part under certain circumstances we can end up with an empty message.
Since our new behaviour denies them (like the real AD) we need to bypass them
on LDB modify calls.
2009-10-13 00:53:47 +02:00
Matthias Dieter Wallnöfer
7c53386adf s4:dcesrv_samr - Add additional "talloc_free"s 2009-10-13 00:53:47 +02:00
Matthias Dieter Wallnöfer
6e19a9e05d s4:dcesrv_samr - Cosmetics
Make more use of constants and add some braces around "if" blocks
2009-10-13 00:53:25 +02:00
Matthias Dieter Wallnöfer
607ceff234 s3/s4 - Adapt the IDL changes on various locations 2009-10-08 09:50:19 +02:00
Andrew Tridgell
caa9e3ff8e s4-samr: fake up a samr_ValidatePassword response
mdw is working on the correct call to check the password strength
2009-10-02 16:02:42 +10:00
Andrew Tridgell
1261d694f0 more include minimisation 2009-09-19 14:12:01 -07:00
Matthias Dieter Wallnöfer
ad244f7252 s4:samr - Fix up the SAMR server to support the primary group of a user in the right way
When doing some tests with the NT User Manager for Domains on s4 I noticed that the
handling of the primary group for a user wasn't correct. So I fixed this.

Also some cosmetic changes (tab indent corrections).
2009-09-07 08:37:24 +02:00
Günther Deschner
05fbe0c7f7 libds: merge the UF<->ACB flag mapping functions.
Guenther
2009-07-13 15:36:07 +02:00
Günther Deschner
8db45607f8 libds: share UF_ flags between samba3 and 4.
Guenther
2009-07-13 15:36:06 +02:00
Volker Lendecke
68e3442922 Move a comment where it belongs 2009-05-30 18:27:13 +02:00
Andrew Bartlett
227553f904 Win2k3 don't allow creating of domain trust accounts over SAMR 2009-05-29 17:12:06 +10:00
Andrew Bartlett
6ef65389fd Don't use crossRef records to find our own domain
A single AD server can only host a single domain, so don't stuff about
with looking up our crossRef record in the cn=Partitions container.
We instead trust that lp_realm() and lp_workgroup() works correctly.

Andrew Bartlett
2009-05-26 12:37:09 +10:00
Andrew Tridgell
2bf1e8b5e1 cope with lanman auth being disabled in old password change code
When lanman auth is disabled and a user calls a password change
method that requires it we should give NT_STATUS_NOT_SUPPORTED
2009-05-25 13:39:56 +10:00
Andrew Bartlett
0d4bd2c397 s4:samr Use ldb_context * rather than void * 2009-04-23 12:19:10 +02:00
Jelmer Vernooij
94069bd274 s4: Use same function signature for convert_* as s3. 2009-03-01 19:55:46 +01:00
Jelmer Vernooij
9ffb6d2d9e Add allow_badcharcnv argument to all conversion function, for
consistency with Samba 3.
2009-03-01 06:33:40 +01:00
Matthias Dieter Wallnöfer
91bfd5f201 s4-samr: Fix Bug #5946. userparameters handling in samr server.
Signed-off-by: Günther Deschner <gd@samba.org>
2008-12-10 00:07:25 +01:00
Günther Deschner
4bcf8edcf8 s4-samr: fix samr callers after SAMR_FIELD_PASSWORD change.
Guenther
2008-12-05 14:27:03 +01:00
Günther Deschner
ce01168158 s4-samr: fix s4 samr server after idl change.
Guenther
2008-12-05 14:27:03 +01:00
Günther Deschner
01b6eee69f s4-samr: use samr_DomainServerState in samr server.
Guenther
2008-12-02 00:37:39 +01:00
Günther Deschner
09998ab89d s4-samr: merge samr_QueryUserInfo{2} from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:31 +01:00
Günther Deschner
15e011564a s4-samr: merge samr_QueryGroupInfo from s3 idl. (fixme python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
0548642e5b s4-samr: merge samr_QueryAliasInfo from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
99c2fac6b2 s4-samr: merge samr_EnumDomainGroups from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
1ea97d76ed s4-samr: merge samr_EnumDomainUsers from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
d4d9a73ad1 s4-samr: merge samr_EnumDomains from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
bb1d7684d2 s4-samr: merge samr_LookupDomain from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
61391d0ade s4-samr: merge samr_LookupNames from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00