ira/wip.git
14 years agos3: Remove unused winbindd_lookupsid_async
Volker Lendecke [Mon, 21 Dec 2009 13:31:31 +0000 (14:31 +0100)]
s3: Remove unused winbindd_lookupsid_async

14 years agos4-schema: fixed the sorting of schema attributes
Andrew Tridgell [Mon, 21 Dec 2009 12:36:23 +0000 (23:36 +1100)]
s4-schema: fixed the sorting of schema attributes

another case of unsigned int subtracting breaking sorts. This one
surfaced now as attributeID_id now can be larger than 2^31

14 years agos4-torture: update uuid_compare test for new behaviour
Andrew Tridgell [Mon, 21 Dec 2009 12:19:08 +0000 (23:19 +1100)]
s4-torture: update uuid_compare test for new behaviour

14 years agos4-drs: Implement constraints on ATTID values in prefixMap
Kamen Mazdrashki [Fri, 18 Dec 2009 23:49:31 +0000 (01:49 +0200)]
s4-drs: Implement constraints on ATTID values in prefixMap

Ref: MS-ADTS, 3.1.1.2.6 ATTRTYP

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-tort: Test handling of different ATTID values in prefixMap interface.
Kamen Mazdrashki [Fri, 18 Dec 2009 23:48:41 +0000 (01:48 +0200)]
s4-tort: Test handling of different ATTID values in prefixMap interface.

It turns out ATTID values are separated in ranges.
Ref: MS-ADTS, 3.1.1.2.6 ATTRTYP

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agoAdapted acl module to skip checks if as_system control is provided.
Nadezhda Ivanova [Fri, 18 Dec 2009 16:00:15 +0000 (18:00 +0200)]
Adapted acl module to skip checks if as_system control is provided.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-drs: Save prefix map using LDB_CONTROL_AS_SYSTEM control
Kamen Mazdrashki [Fri, 18 Dec 2009 16:15:49 +0000 (18:15 +0200)]
s4-drs: Save prefix map using LDB_CONTROL_AS_SYSTEM control

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-dsdb-util: Execute ldb_request using LDB_CONTROL_AS_SYSTEM
Kamen Mazdrashki [Fri, 18 Dec 2009 16:14:38 +0000 (18:14 +0200)]
s4-dsdb-util: Execute ldb_request using LDB_CONTROL_AS_SYSTEM

This function is intended to be used when data needs
to be modified skipping access checks.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-dsdb-util: Utility function to process ldb_request in transaction
Kamen Mazdrashki [Fri, 18 Dec 2009 16:11:48 +0000 (18:11 +0200)]
s4-dsdb-util: Utility function to process ldb_request in transaction

This function is to be used later for manually crafted
ldb_requests from within dsdb layer

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-schema: Implement msDS-IntId attribute generation
Kamen Mazdrashki [Fri, 18 Dec 2009 01:46:39 +0000 (03:46 +0200)]
s4-schema: Implement msDS-IntId attribute generation

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-schema: Constraints on msDS-IntId attribute
Kamen Mazdrashki [Thu, 17 Dec 2009 21:26:47 +0000 (23:26 +0200)]
s4-schema: Constraints on msDS-IntId attribute

This attribute can not be modified on existing schema object.

msDS-IntId is not allowed during attribute creation also.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-schema: Set ATTID in schema cache from "msDS-IntId"
Kamen Mazdrashki [Fri, 18 Dec 2009 02:08:52 +0000 (04:08 +0200)]
s4-schema: Set ATTID in schema cache from "msDS-IntId"

According to http://msdn.microsoft.com/en-us/library/cc223224%28PROT.13%29.aspx
some Attributes OIDs may not use prefixMap.
Setting ATTID in Schema Cache here should work, although
this code snippet should be moved in separate function.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agoRevert "s4-drs: cope with bogus empty attributes from w2k8-r2"
Kamen Mazdrashki [Fri, 18 Dec 2009 01:58:29 +0000 (03:58 +0200)]
Revert "s4-drs: cope with bogus empty attributes from w2k8-r2"

This reverts commit 1287c1d115fb7e8f3954bc05ff65007968403a9c.

Next patch should fix the "not recognized ATTIDs" problem

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-tort: Tests for "msDS-IntId" attribute implemented
Kamen Mazdrashki [Thu, 17 Dec 2009 17:27:47 +0000 (19:27 +0200)]
s4-tort: Tests for "msDS-IntId" attribute implemented

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-tort: Move Schema tests from ldap.py into separate module
Kamen Mazdrashki [Sun, 13 Dec 2009 23:52:18 +0000 (01:52 +0200)]
s4-tort: Move Schema tests from ldap.py into separate module

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-drs: Fix bug - prefixMap is not updated when adding new OIDs.
Kamen Mazdrashki [Fri, 18 Dec 2009 01:53:13 +0000 (03:53 +0200)]
s4-drs: Fix bug - prefixMap is not updated when adding new OIDs.

The bug is that prefixMap is updated only memory when
adding new Classs/Attribute that has and OID not in
prefixMap already.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-drstest: Don't remove temp LDB so it can be reviewed if necessary
Kamen Mazdrashki [Fri, 4 Dec 2009 01:58:59 +0000 (03:58 +0200)]
s4-drstest: Don't remove temp LDB so it can be reviewed if necessary

This test makes temp directory which is not removed
so why not just leave LDB also.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4-repl: give a reason why the prepare commit failed
Andrew Tridgell [Mon, 21 Dec 2009 09:58:09 +0000 (20:58 +1100)]
s4-repl: give a reason why the prepare commit failed

14 years agos4-kcc: don't crash with a NULL ntds connection list
Andrew Tridgell [Mon, 21 Dec 2009 09:57:21 +0000 (20:57 +1100)]
s4-kcc: don't crash with a NULL ntds connection list

14 years agos4-repl: only try to replicate for NCs that we are a master for
Andrew Tridgell [Sun, 20 Dec 2009 00:06:23 +0000 (11:06 +1100)]
s4-repl: only try to replicate for NCs that we are a master for

14 years agos4-torture: another unsigned comparison bug
Andrew Tridgell [Sat, 19 Dec 2009 23:27:17 +0000 (10:27 +1100)]
s4-torture: another unsigned comparison bug

14 years agos4-schema: a unsigned comparison bug in the schema code
Andrew Tridgell [Sat, 19 Dec 2009 23:26:21 +0000 (10:26 +1100)]
s4-schema: a unsigned comparison bug in the schema code

14 years agos4-drs: another two unsigned comparison bugs
Andrew Tridgell [Sat, 19 Dec 2009 23:26:06 +0000 (10:26 +1100)]
s4-drs: another two unsigned comparison bugs

14 years agolibrpc: fixed the GUID_compare() function
Andrew Tridgell [Sat, 19 Dec 2009 23:25:46 +0000 (10:25 +1100)]
librpc: fixed the GUID_compare() function

When comparing two unsigned values you can't just subtract
them.

Imagine you are comparing: "uint32_t u1" and "uint32_t u2". If you use
"u1 - u2" and u2 is zero, then the signed integer result will depend
on the top bit of u1.

This error occurs in a few places in Samba. For DRS replication it
resulted in corrupt uptodateness vectors.

14 years agos4-repl: lower debug level of a common message
Andrew Tridgell [Sat, 19 Dec 2009 12:32:48 +0000 (23:32 +1100)]
s4-repl: lower debug level of a common message

14 years agos4-dsdb: don't use a non-constant format string for a printf format
Andrew Tridgell [Sat, 19 Dec 2009 09:58:00 +0000 (20:58 +1100)]
s4-dsdb: don't use a non-constant format string for a printf format

14 years agos4-dsdb: added DSDB_MODIFY_RELAX flag to the dsdb_module_*() calls
Andrew Tridgell [Sat, 19 Dec 2009 09:56:41 +0000 (20:56 +1100)]
s4-dsdb: added DSDB_MODIFY_RELAX flag to the dsdb_module_*() calls

14 years agos4-dsdb: added dsdb_get_extended_dn_uint64()
Andrew Tridgell [Sat, 19 Dec 2009 01:23:42 +0000 (12:23 +1100)]
s4-dsdb: added dsdb_get_extended_dn_uint64()

14 years agos4-dsdb: use varargs expression in dsdb_module_search()
Andrew Tridgell [Fri, 18 Dec 2009 09:55:23 +0000 (20:55 +1100)]
s4-dsdb: use varargs expression in dsdb_module_search()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

14 years agos4-dsdb: added two new dsdb_get_extended_dn_*() helper functions
Andrew Tridgell [Fri, 18 Dec 2009 09:54:23 +0000 (20:54 +1100)]
s4-dsdb: added two new dsdb_get_extended_dn_*() helper functions

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

14 years agos4-provision: added a note about where invocationIDs come from
Andrew Tridgell [Fri, 18 Dec 2009 03:45:58 +0000 (14:45 +1100)]
s4-provision: added a note about where invocationIDs come from

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

14 years agos4-dsdb: give us an invocationID when in standalone mode
Andrew Tridgell [Fri, 18 Dec 2009 02:47:46 +0000 (13:47 +1100)]
s4-dsdb: give us an invocationID when in standalone mode

To allow us to use the repl_meta_data module in standalone mode (and
thus not have two module stacks to test), we need a invocationID
stored somewhere when standalone. This creates a random one, and
stores it in @SAMBA_DSDB.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

14 years agos3: Fix an error case in cli_negprot
Volker Lendecke [Sun, 20 Dec 2009 22:29:32 +0000 (23:29 +0100)]
s3: Fix an error case in cli_negprot

14 years agotevent: prefix types and defined with tevent_ and TEVENT_
Stefan Metzmacher [Sun, 20 Dec 2009 12:59:03 +0000 (13:59 +0100)]
tevent: prefix types and defined with tevent_ and TEVENT_

This fixes the build warnings on some build-farm hosts.

metze

14 years agoOutput %p as unsigned in snprintf replacement.
Peter Rosin [Sat, 19 Dec 2009 18:43:52 +0000 (19:43 +0100)]
Output %p as unsigned in snprintf replacement.

14 years agos4:kdc: setup the local and remote tsocket_address at accept time
Stefan Metzmacher [Wed, 4 Nov 2009 18:22:53 +0000 (19:22 +0100)]
s4:kdc: setup the local and remote tsocket_address at accept time

metze

14 years agos4:kdc: convert UDP based communication to tdgram_context
Stefan Metzmacher [Wed, 4 Nov 2009 18:22:53 +0000 (19:22 +0100)]
s4:kdc: convert UDP based communication to tdgram_context

metze

14 years agoActually explain the twisty paths of tortured logic behind
Jeremy Allison [Fri, 18 Dec 2009 22:28:22 +0000 (14:28 -0800)]
Actually explain the twisty paths of tortured logic behind
reply_doserror(), reply_nterror(), and reply_nterror(NT_STATUS_DOS()).

Fix the call in rely_openerror() to actually force a DOS error
for "too many open files".

Jeremy.

14 years agoreply_doserror() doesn't force DOS errors on the wire.
Jeremy Allison [Fri, 18 Dec 2009 22:25:39 +0000 (14:25 -0800)]
reply_doserror() doesn't force DOS errors on the wire.

Start migrating uses of reply_doserror() to reply_nterror() with the
correct mapping. Eventually we'll get to the point where we can
change reply_doserror() to force a DOS error code on the wire,
and can change calls to reply_nterror(req, NT_STATUS_DOS()) - which *does*
force DOS errors on the wire - to reply_doserror(). Which might
actually make the server code look like it's making sense.

Jeremy.

14 years agoreply_force_nterror() is not used anywhere. Remove it.
Jeremy Allison [Fri, 18 Dec 2009 22:25:07 +0000 (14:25 -0800)]
reply_force_nterror() is not used anywhere. Remove it.
Jeremy.

14 years agos4 torture: Add test to show archive bit behavior with directories
Zachary Loafman [Thu, 17 Dec 2009 22:32:58 +0000 (22:32 +0000)]
s4 torture: Add test to show archive bit behavior with directories

Signed-off-by: Tim Prouty <tprouty@samba.org>
14 years agos4 torture: Fix RAW-STREAMS-DELETE to pass against samba3
Tim Prouty [Fri, 18 Dec 2009 17:35:57 +0000 (09:35 -0800)]
s4 torture: Fix RAW-STREAMS-DELETE to pass against samba3

14 years agoAdded freeing a successful req so it doesnt croud the ldb context
Nadezhda Ivanova [Fri, 18 Dec 2009 15:57:08 +0000 (17:57 +0200)]
Added freeing a successful req so it doesnt croud the ldb context

14 years agoAdded oid for AS_SYSTEM control, used to bypass access checks for system operations.
Nadezhda Ivanova [Fri, 18 Dec 2009 13:40:11 +0000 (15:40 +0200)]
Added oid for AS_SYSTEM control, used to bypass access checks for system operations.

14 years agos3-docs: mention pam_winbind.conf(5) manpage in pam_winbind(8) manpage.
Günther Deschner [Fri, 18 Dec 2009 12:56:43 +0000 (13:56 +0100)]
s3-docs: mention pam_winbind.conf(5) manpage in pam_winbind(8) manpage.

Guenther

14 years agos3-docs: add new pam_winbind.conf(5) manpage.
Günther Deschner [Fri, 18 Dec 2009 12:56:01 +0000 (13:56 +0100)]
s3-docs: add new pam_winbind.conf(5) manpage.

Guenther

14 years agos4-dsdb: stop warnings about unknown struct GUID in prototypes
Andrew Tridgell [Fri, 18 Dec 2009 03:57:57 +0000 (14:57 +1100)]
s4-dsdb: stop warnings about unknown struct GUID in prototypes

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

14 years agos4-ldb: fixed a valgrind error in ldbtest
Andrew Tridgell [Fri, 18 Dec 2009 02:07:48 +0000 (13:07 +1100)]
s4-ldb: fixed a valgrind error in ldbtest

we were using msg->dn after the ldb it contained had been freed

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

14 years agos4-dsdb: greatly simplify the subtree_delete module
Andrew Tridgell [Thu, 17 Dec 2009 12:01:13 +0000 (23:01 +1100)]
s4-dsdb: greatly simplify the subtree_delete module

We can use dsdb_module_search() to make this much simpler

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

14 years agos4-dsdb: declare ldb_dn_update_components()
Andrew Tridgell [Thu, 17 Dec 2009 12:04:00 +0000 (23:04 +1100)]
s4-dsdb: declare ldb_dn_update_components()

14 years agos4-dsdb: added ldb_dn_update_components()
Andrew Tridgell [Thu, 17 Dec 2009 12:03:41 +0000 (23:03 +1100)]
s4-dsdb: added ldb_dn_update_components()

This is used to udpate just the DN components of a ldb_dn, leaving the
other extended fields alone. It is needed to prevent linked attribute
updates from removing other extended components.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

14 years agos4-dsdb: fixed the sort in dsdb_find_nc_root()
Andrew Tridgell [Thu, 17 Dec 2009 12:50:05 +0000 (23:50 +1100)]
s4-dsdb: fixed the sort in dsdb_find_nc_root()

14 years agos4-ldb: display msDS-OptionalFeatureGUID as a GUID
Andrew Tridgell [Fri, 18 Dec 2009 00:43:21 +0000 (11:43 +1100)]
s4-ldb: display msDS-OptionalFeatureGUID as a GUID

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

14 years agos4-scripts: add a enablerecyclebin script
Andrew Tridgell [Fri, 18 Dec 2009 00:44:20 +0000 (11:44 +1100)]
s4-scripts: add a enablerecyclebin script

This can be used to enable the recyclebin on a windows box. Once we
properly implement this feature in samba we will use this to enable
the feature on ourselves as well.

14 years agos4-ldb: canonicalise the message on ldb_add
Andrew Tridgell [Thu, 17 Dec 2009 03:20:35 +0000 (14:20 +1100)]
s4-ldb: canonicalise the message on ldb_add

This canonicalise avoids a problem with an add that has multiple
elements with the same el->name. That is allowed by MS servers, and by
ldb, but it breaks things like the tdb backend and the repl_meta_data
RPMD handling.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

14 years agos4-dsdb: Add a test for adding, deleting, and appending a posixAccount objectClass...
Brendan Powers [Tue, 15 Dec 2009 01:51:10 +0000 (20:51 -0500)]
s4-dsdb: Add a test for adding, deleting, and appending a posixAccount objectClass to a user

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
14 years agos4-dsdb: fix handling of AUX classes in objectclass_sort
Brendan Powers [Tue, 15 Dec 2009 01:47:18 +0000 (20:47 -0500)]
s4-dsdb: fix handling of AUX classes in objectclass_sort

This is done by sorting the classes by subClass_order, which will
check if the last structural class is valid to add (in
objectclass_do_add instead checking the last class in the list).

They were being sorted by building a class tree, and adding the
classes to the list in that order. However, AUX classes usually don't
fit into that tree, so LDB_ERR_OBJECT_CLASS_VIOLATION was returned. I
have changed the behavior to sort the classes by subClass_order
instead.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
14 years agos4-dsdb: return an error if samAccountName is not specified when creating a user.
Brendan Powers [Tue, 15 Dec 2009 01:40:26 +0000 (20:40 -0500)]
s4-dsdb: return an error if samAccountName is not specified when creating a user.

Makes sure samAccountName has been specified before adding a
user. This happened while I was trying to add a user with the
posixAccount objectclass. I forgot to specify the user objectClass,
and samba segfaulted. It now returns LDB_ERR_CONSTRAINT_VIOLATION.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
14 years agos4-dsdb: Move get_last_structural class from descriptor.c to util.c
Brendan Powers [Tue, 15 Dec 2009 01:36:44 +0000 (20:36 -0500)]
s4-dsdb: Move get_last_structural class from descriptor.c to util.c

It can now also be used by objectclass.c

get_last_structural_class now ignores AUX classes, because they are
not structural

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
14 years agos4-dsdb: Add a check to prevent acl_modify from debuging a NULL message
Brendan Powers [Tue, 15 Dec 2009 01:32:28 +0000 (20:32 -0500)]
s4-dsdb: Add a check to prevent acl_modify from debuging a NULL message

Check to see if there were any messages passed to acl_modify before
debugging the first one. I think I caused this by some malformed
LDIF.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
14 years agoReturn NULL in strlower_talloc if src is NULL
Brendan Powers [Tue, 15 Dec 2009 01:28:48 +0000 (20:28 -0500)]
Return NULL in strlower_talloc if src is NULL

Prevents strlower_talloc from segfaulting if you pass it a NULL string.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
14 years agos4:provision Give a more useful error message in guess_names
Andrew Bartlett [Tue, 15 Dec 2009 05:41:37 +0000 (16:41 +1100)]
s4:provision Give a more useful error message in guess_names

The problem here is that as we start to get 'real users' they still
decide to do silly things, like load empty but existing smb.conf
files.  Let's give them a better chance to discover what they did
wrong.

Andrew Bartlett

14 years agoAlways map EMFILE to ERRDOS, ERRnofids, *NOT* NT_STATUS_TOO_MANY_OPENED_FILES.
Jeremy Allison [Fri, 18 Dec 2009 02:31:44 +0000 (18:31 -0800)]
Always map EMFILE to ERRDOS, ERRnofids, *NOT* NT_STATUS_TOO_MANY_OPENED_FILES.
This is what W2KR3 does for NTCreateX and openX calls. May be the correct fix
for bug 6837 - "Too many open files" when trying to access large number of files.
Jeremy.

14 years agoVector correctly through reply_openerror() (which uses the same logic).
Jeremy Allison [Fri, 18 Dec 2009 02:31:26 +0000 (18:31 -0800)]
Vector correctly through reply_openerror() (which uses the same logic).
Jeremy.

14 years agos4 torture: RAW-STREAMS-NAMES Make sure the create time of the streams are different...
Tim Prouty [Thu, 17 Dec 2009 21:42:24 +0000 (13:42 -0800)]
s4 torture: RAW-STREAMS-NAMES Make sure the create time of the streams are different from the base file

14 years agos4 torture: Add RAW-STREAMS-RENAME3 to show error when trying to overwrite a stream...
Tim Prouty [Thu, 17 Dec 2009 18:39:51 +0000 (10:39 -0800)]
s4 torture: Add RAW-STREAMS-RENAME3 to show error when trying to overwrite a stream with an open handle

A normal file overwrite in this case would return NT_STATUS_ACCESS_DENIED,
but if a stream is the target NT_STATUS_INVALID_PARAMETER is returned.

14 years agos4 torture: Parameterize streams delete behavior rather than commenting out the check.
Tim Prouty [Wed, 16 Dec 2009 22:31:54 +0000 (14:31 -0800)]
s4 torture: Parameterize streams delete behavior rather than commenting out the check.

14 years agos4 torture: RAW-STREAMS-CREATEDISP Use a normal deny mode
Tim Prouty [Thu, 17 Dec 2009 21:35:01 +0000 (13:35 -0800)]
s4 torture: RAW-STREAMS-CREATEDISP Use a normal deny mode

14 years agos4 torture: close handle instead of using exit
Tim Prouty [Wed, 16 Dec 2009 01:17:48 +0000 (17:17 -0800)]
s4 torture: close handle instead of using exit

14 years agoUpdate default with correct value. Add a note about Win7 behavior
Jeremy Allison [Fri, 18 Dec 2009 00:50:35 +0000 (16:50 -0800)]
Update default with correct value. Add a note about Win7 behavior
here.
Jeremy.

14 years agoFix bug #6939 - mangling method = hash breaks long filenames.
Jeremy Allison [Fri, 18 Dec 2009 00:14:30 +0000 (16:14 -0800)]
Fix bug #6939 - mangling method = hash breaks long filenames.

We were returning the wrong sense of the bool. must_mangle()
has to return !NT_STATUS_IS_OK, not NT_STATUS_IS_OK.

Jeremy.

14 years agos4:"samdb_set_password" - remove delete instructions
Matthias Dieter Wallnöfer [Thu, 17 Dec 2009 18:41:11 +0000 (19:41 +0100)]
s4:"samdb_set_password" - remove delete instructions

They won't work when the LDB change is done using "samdb_replace"
(consider "samr_password.c" functions).

I think this has been a relict which has been useful before the "password_hash"
module existed. Basically it itself does now the updates.

14 years agos4-smbtorture: skip GetAliasMembership against s4.
Günther Deschner [Thu, 17 Dec 2009 17:02:53 +0000 (18:02 +0100)]
s4-smbtorture: skip GetAliasMembership against s4.

It returns NT_STATUS_INTERNAL_DB_CORRUPTION for unknown sids and I could not
figure out why.

Guenther

14 years agoFixed incorrect checking of PRINCIPAL_SELF permissions.
Nadezhda Ivanova [Thu, 17 Dec 2009 15:25:11 +0000 (17:25 +0200)]
Fixed incorrect checking of PRINCIPAL_SELF permissions.

If an ace has the PRINCIPAL_SELF as trustee, this sid has to be replaced with
the onjectSid of the object being checked. PRINCIPAL_SELF is the way to grant rights
to an account over itself.

14 years agos4-smbtorture: add a samr_GetAliasMembership test to RPC-SAMR.
Günther Deschner [Thu, 17 Dec 2009 14:34:22 +0000 (15:34 +0100)]
s4-smbtorture: add a samr_GetAliasMembership test to RPC-SAMR.

Guenther

14 years agotdbtool: avoid using c++ reserved words.
Günther Deschner [Wed, 16 Dec 2009 23:13:23 +0000 (00:13 +0100)]
tdbtool: avoid using c++ reserved words.

Guenther

14 years agos3: Run RPC-SAMBA3-GETALIASMEMBERSHIP-0 in make test
Volker Lendecke [Thu, 17 Dec 2009 10:58:43 +0000 (11:58 +0100)]
s3: Run RPC-SAMBA3-GETALIASMEMBERSHIP-0 in make test

14 years agos4:dsdb/common/util - make NTTIME attribute wrappers use a "const" message
Matthias Dieter Wallnöfer [Thu, 17 Dec 2009 11:43:10 +0000 (12:43 +0100)]
s4:dsdb/common/util - make NTTIME attribute wrappers use a "const" message

There is no reason to have the message non-const here.

14 years agos3: Fix bug 6992, make test for getgrouplist cacheable
Jonas Gorski [Thu, 17 Dec 2009 10:32:21 +0000 (11:32 +0100)]
s3: Fix bug 6992, make test for getgrouplist cacheable

14 years agos4-smbtorture: fix smbtorture after setprinter IDL fixes.
Günther Deschner [Wed, 16 Dec 2009 09:33:41 +0000 (10:33 +0100)]
s4-smbtorture: fix smbtorture after setprinter IDL fixes.

Guenther

14 years agos3-spoolss: fix rpcclient after setprinter IDL fixes.
Günther Deschner [Wed, 16 Dec 2009 09:33:13 +0000 (10:33 +0100)]
s3-spoolss: fix rpcclient after setprinter IDL fixes.

Guenther

14 years agospoolss: more mork on SetPrinterInfo() levels.
Günther Deschner [Wed, 16 Dec 2009 09:32:35 +0000 (10:32 +0100)]
spoolss: more mork on SetPrinterInfo() levels.

Guenther

14 years agos4-ntvfs: check if pvfs is NULL in pvfs_logoff
brendan powers [Thu, 17 Dec 2009 00:01:32 +0000 (19:01 -0500)]
s4-ntvfs: check if pvfs is NULL in pvfs_logoff

pvfs can be NULL if the directory a share points to does not exist. In
this case, there would be no open files, so it is safe to just return
from the function.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
14 years agos4:gensec: allow clearing local and remote address by passing NULL
Stefan Metzmacher [Wed, 16 Dec 2009 19:34:15 +0000 (20:34 +0100)]
s4:gensec: allow clearing local and remote address by passing NULL

metze

14 years agos4-gensec: Remove obsolete socket_address vars and fns.
Andreas Schneider [Wed, 16 Dec 2009 17:07:07 +0000 (18:07 +0100)]
s4-gensec: Remove obsolete socket_address vars and fns.

14 years agos4-gensec: Replace gensec_get_peer_addr with new tsocket based fn.
Andreas Schneider [Wed, 16 Dec 2009 15:41:21 +0000 (16:41 +0100)]
s4-gensec: Replace gensec_get_peer_addr with new tsocket based fn.

14 years agos4-gensec: Replace gensec_set_peer_addr with new tsocket based fn.
Andreas Schneider [Wed, 16 Dec 2009 15:12:13 +0000 (16:12 +0100)]
s4-gensec: Replace gensec_set_peer_addr with new tsocket based fn.

14 years agos4-gensec: Replace gensec_get_my_addr with new tsocket based fn.
Andreas Schneider [Wed, 16 Dec 2009 15:06:55 +0000 (16:06 +0100)]
s4-gensec: Replace gensec_get_my_addr with new tsocket based fn.

14 years agos4-gensec: Replace gensec_set_my_addr() with new tsocket based fn.
Andreas Schneider [Wed, 16 Dec 2009 14:52:30 +0000 (15:52 +0100)]
s4-gensec: Replace gensec_set_my_addr() with new tsocket based fn.

14 years agos4-gensec: Added remote and local setter/getter using tsocket.
Andreas Schneider [Wed, 16 Dec 2009 12:27:20 +0000 (13:27 +0100)]
s4-gensec: Added remote and local setter/getter using tsocket.

14 years agoFinal part of the fix for 6837 - "Too many open files" when trying to access large...
Jeremy Allison [Wed, 16 Dec 2009 18:19:19 +0000 (10:19 -0800)]
Final part of the fix for 6837 - "Too many open files" when trying to access large number of files

Win7 needs a min of 16k file handles to work against a
server.

Jeremy.

14 years agoAdd helpful debug of DACL for errors on ACL access.
Jeremy Allison [Wed, 16 Dec 2009 18:09:11 +0000 (10:09 -0800)]
Add helpful debug of DACL for errors on ACL access.
Jeremy.

14 years agospoolss: add spoolss_DriverInfo7.
Günther Deschner [Wed, 16 Dec 2009 09:39:00 +0000 (10:39 +0100)]
spoolss: add spoolss_DriverInfo7.

Guenther

14 years agos3-pdbedit: allow to call "pdbedit -N description -u user" without specifiyng "-r".
Günther Deschner [Wed, 16 Dec 2009 14:59:04 +0000 (15:59 +0100)]
s3-pdbedit: allow to call "pdbedit -N description -u user" without specifiyng "-r".

Guenther

14 years agos4-dsdb: also mark the relax control non-critical when done
Andrew Tridgell [Wed, 16 Dec 2009 09:45:40 +0000 (20:45 +1100)]
s4-dsdb: also mark the relax control non-critical when done

14 years agos4-dsdb: it is a better pattern to mark a control as done than remove it
Andrew Tridgell [Wed, 16 Dec 2009 09:45:02 +0000 (20:45 +1100)]
s4-dsdb: it is a better pattern to mark a control as done than remove it

removing a control means it can't be seen by any other modules, which
is usually not what is wanted. Better to just mark it non-critical,
which means anyone else who wants to look at it can, but if nobody
does its not an error.

14 years agos4-dsdb: when the SD_FLAGS control is set, don't remove nTSecurityDescriptor
Andrew Tridgell [Wed, 16 Dec 2009 09:39:55 +0000 (20:39 +1100)]
s4-dsdb: when the SD_FLAGS control is set, don't remove nTSecurityDescriptor

14 years agos4-dsdb: don't actually remove the sd_flags control, just mark it non-critical
Andrew Tridgell [Wed, 16 Dec 2009 09:39:18 +0000 (20:39 +1100)]
s4-dsdb: don't actually remove the sd_flags control, just mark it non-critical

For controls that need to be seen by more than one module, it is best
to just mark them non-critical when handled, instead of removing
them. Otherwise lower modules can't see them.

In this case we want the operational module to see the SD_FLAGS
control

14 years agos4-ldb: show the OID of any unhandled critical controls
Andrew Tridgell [Wed, 16 Dec 2009 06:13:19 +0000 (17:13 +1100)]
s4-ldb: show the OID of any unhandled critical controls

It isn't very useful just saying that a control is not supported,
without saying which one is the problem

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

14 years agos4-ldb: fixed a transaction error on prepare_commit
Andrew Tridgell [Wed, 16 Dec 2009 06:12:28 +0000 (17:12 +1100)]
s4-ldb: fixed a transaction error on prepare_commit

when a prepare commit fails, we need to give a cancel to all modules,
not a commit!

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>