1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

58243 Commits

Author SHA1 Message Date
Andrew Tridgell
cb841c363a 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>
2009-12-18 21:03:40 +11:00
Andrew Tridgell
5d7805b07f 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>
2009-12-18 21:03:40 +11:00
Andrew Tridgell
b3c69e76ec s4-dsdb: declare ldb_dn_update_components() 2009-12-18 21:03:39 +11:00
Andrew Tridgell
82bf0d8bc6 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>
2009-12-18 21:03:39 +11:00
Andrew Tridgell
db76e65318 s4-dsdb: fixed the sort in dsdb_find_nc_root() 2009-12-18 21:03:39 +11:00
Andrew Tridgell
f392ae5169 s4-ldb: display msDS-OptionalFeatureGUID as a GUID
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-18 21:03:39 +11:00
Andrew Tridgell
811b4054f9 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.
2009-12-18 21:03:39 +11:00
Andrew Tridgell
20869a0bf0 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>
2009-12-18 21:03:39 +11:00
Brendan Powers
7cb858e151 s4-dsdb: Add a test for adding, deleting, and appending a posixAccount objectClass to a user
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-12-18 14:27:44 +11:00
Brendan Powers
08060068bf 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>
2009-12-18 14:27:44 +11:00
Brendan Powers
8b88925654 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>
2009-12-18 14:27:43 +11:00
Brendan Powers
d99084ffdb 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>
2009-12-18 14:27:43 +11:00
Brendan Powers
2ad086e7f6 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>
2009-12-18 14:27:43 +11:00
Brendan Powers
027cba6a49 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>
2009-12-18 14:27:43 +11:00
Andrew Bartlett
c3d1e5ca0c 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
2009-12-18 14:27:43 +11:00
Jeremy Allison
0c1ff3bb09 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.
2009-12-17 18:31:44 -08:00
Jeremy Allison
f8ab38a8f2 Vector correctly through reply_openerror() (which uses the same logic).
Jeremy.
2009-12-17 18:31:26 -08:00
Tim Prouty
cfbf62dbfd s4 torture: RAW-STREAMS-NAMES Make sure the create time of the streams are different from the base file 2009-12-17 18:13:54 -08:00
Tim Prouty
c3582f923e 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.
2009-12-17 18:13:48 -08:00
Tim Prouty
f8bb5a60e7 s4 torture: Parameterize streams delete behavior rather than commenting out the check. 2009-12-17 17:58:35 -08:00
Tim Prouty
f02206d933 s4 torture: RAW-STREAMS-CREATEDISP Use a normal deny mode 2009-12-17 17:58:35 -08:00
Tim Prouty
5c13a90abe s4 torture: close handle instead of using exit 2009-12-17 17:58:34 -08:00
Jeremy Allison
fbf4923cad Update default with correct value. Add a note about Win7 behavior
here.
Jeremy.
2009-12-17 16:50:35 -08:00
Jeremy Allison
159c1b860a 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.
2009-12-17 16:14:30 -08:00
Matthias Dieter Wallnöfer
bbec305135 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.
2009-12-17 20:00:19 +01:00
Günther Deschner
dc4c411242 s4-smbtorture: skip GetAliasMembership against s4.
It returns NT_STATUS_INTERNAL_DB_CORRUPTION for unknown sids and I could not
figure out why.

Guenther
2009-12-17 18:05:36 +01:00
Nadezhda Ivanova
c0883fb451 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.
2009-12-17 17:25:11 +02:00
Günther Deschner
619ad0c6ec s4-smbtorture: add a samr_GetAliasMembership test to RPC-SAMR.
Guenther
2009-12-17 15:40:42 +01:00
Günther Deschner
a23084e1e8 tdbtool: avoid using c++ reserved words.
Guenther
2009-12-17 15:40:42 +01:00
Volker Lendecke
eb7ff9220d s3: Run RPC-SAMBA3-GETALIASMEMBERSHIP-0 in make test 2009-12-17 12:48:27 +01:00
Matthias Dieter Wallnöfer
1d0f364fad s4:dsdb/common/util - make NTTIME attribute wrappers use a "const" message
There is no reason to have the message non-const here.
2009-12-17 12:43:10 +01:00
Jonas Gorski
e3ee8ffc1b s3: Fix bug 6992, make test for getgrouplist cacheable 2009-12-17 11:38:03 +01:00
Günther Deschner
a9689bb755 s4-smbtorture: fix smbtorture after setprinter IDL fixes.
Guenther
2009-12-17 10:43:32 +01:00
Günther Deschner
31cf2b086a s3-spoolss: fix rpcclient after setprinter IDL fixes.
Guenther
2009-12-17 10:43:31 +01:00
Günther Deschner
be95cb6f83 spoolss: more mork on SetPrinterInfo() levels.
Guenther
2009-12-17 10:43:31 +01:00
brendan powers
0708b2a0c9 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>
2009-12-17 11:48:39 +11:00
Stefan Metzmacher
fae70e1f54 s4:gensec: allow clearing local and remote address by passing NULL
metze
2009-12-16 20:34:15 +01:00
Andreas Schneider
c457d54434 s4-gensec: Remove obsolete socket_address vars and fns. 2009-12-16 20:28:39 +01:00
Andreas Schneider
1e5488859a s4-gensec: Replace gensec_get_peer_addr with new tsocket based fn. 2009-12-16 20:28:38 +01:00
Andreas Schneider
ac2d31e24c s4-gensec: Replace gensec_set_peer_addr with new tsocket based fn. 2009-12-16 20:28:38 +01:00
Andreas Schneider
8ca88042f0 s4-gensec: Replace gensec_get_my_addr with new tsocket based fn. 2009-12-16 20:28:38 +01:00
Andreas Schneider
226a9db2d9 s4-gensec: Replace gensec_set_my_addr() with new tsocket based fn. 2009-12-16 20:28:38 +01:00
Andreas Schneider
743e6363d5 s4-gensec: Added remote and local setter/getter using tsocket. 2009-12-16 20:28:37 +01:00
Jeremy Allison
8f4d4a6758 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.
2009-12-16 10:19:19 -08:00
Jeremy Allison
b8c87c43dd Add helpful debug of DACL for errors on ACL access.
Jeremy.
2009-12-16 10:09:11 -08:00
Günther Deschner
64e588f868 spoolss: add spoolss_DriverInfo7.
Guenther
2009-12-16 16:09:41 +01:00
Günther Deschner
d9f93224bd s3-pdbedit: allow to call "pdbedit -N description -u user" without specifiyng "-r".
Guenther
2009-12-16 16:08:48 +01:00
Andrew Tridgell
8d3fc23157 s4-dsdb: also mark the relax control non-critical when done 2009-12-16 20:56:24 +11:00
Andrew Tridgell
558a38671a 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.
2009-12-16 20:56:24 +11:00
Andrew Tridgell
41e403adb0 s4-dsdb: when the SD_FLAGS control is set, don't remove nTSecurityDescriptor 2009-12-16 20:56:24 +11:00