Michael Adam
c27c430b21
s3:smbcacls: also honour the "--sddl" flag when setting ACLs.
...
Michael
2010-03-16 00:12:25 +01:00
Volker Lendecke
3b73698715
s3: Fix an uninitialized variable read
...
Found by Laurent Gaffie <laurent.gaffie@gmail.com>
Thanks for that,
Volker
2010-03-15 16:01:48 -07:00
Jeremy Allison
c35c38075c
Remove the bool admin_user from conn struct. We no longer look at this to make access decisions.
...
Jeremy.
2010-03-15 15:39:41 -07:00
Jeremy Allison
704a607e3c
Fix bug #7188 - Logic error in check of total_data for call_trans2mkdir()
...
Make ea data checks identical for trans2open and trans2mkdir.
Jeremy.
2010-03-15 15:04:18 -07:00
Jeremy Allison
33bd9b4bb9
Remove reference to conn->admin_user in preparation for removal.
...
We use (uid_t)0 here not sec_initial_uid() as make test uses a single user context.
I will revisit this when all the uid check changes are complete.
Jeremy.
2010-03-15 14:49:26 -07:00
Jeremy Allison
b32ce075f8
Simplify processing of "admin user". If a user is an admin_user ensure their conn token is uid 0.
...
This simplifies change_to_user() and removes special processing of the assignments
we pass to set_sec_ctx().
Jeremy.
2010-03-15 14:49:20 -07:00
Jeremy Allison
984eee7e29
Switch over to using get_currect_XXX() accessor functions.
...
Jeremy.
2010-03-15 14:49:15 -07:00
Jeremy Allison
6b2358e15e
Pass "connection_struct *conn" into functions that currently use "current_user.XXX"
...
Will allow me to replace them with accessor functions.
Jeremy.
2010-03-15 14:49:11 -07:00
Jeremy Allison
5d6610a215
Add accessor functions for current uid, gid, unix token, NT token and vuid.
...
Jeremy.
2010-03-15 14:49:06 -07:00
Jeremy Allison
1332ce52b7
We don't need to treat the token differently in the conn->admin_user case, it should already be pointing to a token with uid == 0.
...
Jeremy.
2010-03-15 14:49:00 -07:00
Jeremy Allison
4b85a0ea7f
Rever e80ceb1d73
"Remove more uses of "extern struct current_user current_user;"."
...
As requested by Volker, split this into smaller commits.
Jeremy.
2010-03-15 14:48:54 -07:00
Günther Deschner
83b9e12513
s4-smbtorture: add simple printer rename test to RPC-SPOOLSS-PRINTER.
...
Guenther
2010-03-15 18:35:19 +01:00
Günther Deschner
6f36e9d504
testprogs: add EnumPrinterData test to win32 spoolss test.
...
Guenther
2010-03-15 17:27:12 +01:00
Günther Deschner
08ec9b7e73
s4-smbtorture: fill PrinterDriverData with more values for consistency test.
...
Guenther
2010-03-15 17:27:12 +01:00
Stefan Metzmacher
386f15c62b
s3:smbd: make sure we always have a valid talloc stackframe
...
metze
2010-03-15 15:08:24 +01:00
Stefan Metzmacher
d23581b4d7
talloc_stack: reset stackframe pointers to NULL
...
This makes it easier to debug the code in future.
metze
2010-03-15 15:08:24 +01:00
Stefan Metzmacher
10ed809a1a
talloc_stack: make sure we never let talloc_tos() return ts->talloc_stack[-1]
...
In smbd there's a small gab between TALLOC_FREE(frame); before
be call smbd_parent_loop() where we don't have a valid talloc stackframe.
smbd_parent_loop() calls talloc_stackframe() only within the while(1) loop.
As DEBUG(2,("waiting for connections")) uses talloc_tos() to construct
the time header for the debug message we crash on some systems.
metze
2010-03-15 15:08:23 +01:00
Günther Deschner
1eb0fbe68d
s4-smbtorture: cleanup data after enumdata{ex} consistency test.
...
Guenther
2010-03-15 14:55:25 +01:00
Günther Deschner
c9cc26ef62
s3-spoolss: Fix _spoolss_EnumPrinterData.
...
Guenther
2010-03-15 14:41:58 +01:00
Günther Deschner
06cbf05e8b
s4-smbtorture: when cross checking enumdata{ex} make sure to have at least one entry.
...
Guenther
2010-03-15 14:16:03 +01:00
Günther Deschner
6bfde084e6
s4-smbtorture: add PrinterInfo_to_SetPrinterInfo helper to RPC-SPOOLSS.
...
Guenther
2010-03-15 14:16:03 +01:00
Matthias Dieter Wallnöfer
163e559606
s4:registry - rpc - don't crash when communication partner isn't available
2010-03-15 13:44:00 +01:00
Matthias Dieter Wallnöfer
cc3eec1681
s4:registry - util.c - treat unsupported and binary values as the same in the conversion functions
...
We don't need to provide an extra representation for all available registry types.
But if we treat all unsupported types as binary we also get our tools (regtree,
regshell, regdiff...) working with them in a basic manner.
2010-03-15 13:28:12 +01:00
Matthias Dieter Wallnöfer
4e6c0e1f6f
s4:registry - util.c - move the "REG_NONE" case in the conversion functions on top of the switch
...
(As in the "reg_value_types" structure)
2010-03-15 13:27:40 +01:00
Matthias Dieter Wallnöfer
1e5010d353
s4:registry - local testsuite - add a test for REG_QWORD
...
Change also here to fixed-length HEX values output to test for the right
representation.
2010-03-15 13:27:35 +01:00
Matthias Dieter Wallnöfer
00934d4c2f
s4:registry - fix up the output of hexadecimal values
...
Use a fixed-length representation to avoid platform-specific issues.
2010-03-15 13:27:35 +01:00
Matthias Dieter Wallnöfer
80300af278
s4:registry - add support for REG_QWORD values
...
Basically the same as REG_DWORD but these are eight byte long.
2010-03-15 13:27:34 +01:00
Günther Deschner
c3eb509dea
s4-smbtorture: fix torture_comment in RPC-SPOOLSS.
...
Guenther
2010-03-15 10:20:27 +01:00
Stefan Metzmacher
f49d5e3288
s4:tortore/libnet: fix crash bugs because of incorrect function prototypes
...
metze
2010-03-15 09:40:28 +01:00
Matthias Dieter Wallnöfer
eb8c8a0eca
s4:registry - util.c - add harder checks for inputs on "reg_val_data_string"
...
("NULL" result is error on most data types).
2010-03-14 18:46:23 +01:00
Matthias Dieter Wallnöfer
508c218eb2
Revert "s4-smbtorture: skip extended SetValue test against Samba (both dont survive)."
...
This reverts commit 40e2c04f8a
.
s4 should support now also the extended "SetValue" tests.
2010-03-14 18:46:23 +01:00
Matthias Dieter Wallnöfer
bb1ac0c75c
s4:registry - ldb.c - provide a mechanism for storing UTF8/binary REG_DWORD values
...
We need to support this as gd's WINREG torture test shows.
2010-03-14 18:46:22 +01:00
Matthias Dieter Wallnöfer
fbce5ded30
s4:registry - ldb.c - provide a mechansim for storing UTF8/binary REG_SZ/REG_EXPAND_SZ values
...
We need to support this as gd's WINREG torture test shows.
2010-03-14 18:46:22 +01:00
Matthias Dieter Wallnöfer
95bfd17e08
s4:registry - ldb.c - fix up a strange LDB filter
2010-03-14 18:46:21 +01:00
Matthias Dieter Wallnöfer
f72790daaa
s4:registry - ldb.c - fix up the memory handling in "reg_ldb_unpack_value"
...
Don't substitute existing data blobs with new ones and make sure, that the
result objects in the data blob don't have memory dependencies of the LDB value
input.
2010-03-14 18:46:21 +01:00
Matthias Dieter Wallnöfer
33eb1c95e5
s4:registry - ldb.c - check more for possible "Out of memory" circumstances
2010-03-14 18:46:21 +01:00
Matthias Dieter Wallnöfer
9b3c45754e
s4:registry - ldb.c - remove superfluous "query" variable
2010-03-14 18:46:21 +01:00
Matthias Dieter Wallnöfer
cd3c870333
s4:registry - ldb.c - Consider result values in "reg_ldb_pack_value"
...
Break on errors and return NULL and otherwise the message pointer.
2010-03-14 18:46:20 +01:00
Matthias Dieter Wallnöfer
3c6792bc76
s4:registry - ldb.c - Move the "val" structure
...
Move it into the REG_SZ/REG_EXPAND_SZ case block since it's used only there.
Plus convert it from static into dynamic talloc'ed.
2010-03-14 18:46:20 +01:00
Volker Lendecke
727fb85782
s3: Remove some unused #defines
2010-03-14 17:42:49 +01:00
Volker Lendecke
2111fe5255
s3: Use a switch to implement map_nt_error_from_tdb
...
First, this immediately gave me the warning that TDB_ERR_NESTING was not
covered and second, this saved 48 bytes in the .o :-)
2010-03-14 17:42:49 +01:00
Volker Lendecke
6c00a3db24
s3: Remove some unused code
2010-03-14 17:42:49 +01:00
Volker Lendecke
e00327323d
s3: Fix some nonempty blank lines
2010-03-14 17:42:49 +01:00
Matthias Dieter Wallnöfer
5e06110bc1
Reintroduce "s4:provision Improve the handling of provision errors""
...
This mainly reverts commit f0bc02d74c
.
Jelmer pointed out a way how we can achieve the same error handling with an
older syntax also on Python 2.4+.
2010-03-14 10:34:26 +01:00
Volker Lendecke
b4826b9393
s3: Convert unexpected.tdb to use tdb_wrap_open
2010-03-13 20:20:37 +01:00
Volker Lendecke
cfc44d2441
s3: Make tdb_wrap_open more robust
...
This hides the use of talloc_reference from the caller, making it impossible to
wrongly call talloc_free() on the result.
2010-03-13 20:20:37 +01:00
Matthias Dieter Wallnöfer
5eeb1fc447
NSS:winbind_struct_protocol.h - fix typo
2010-03-13 12:58:58 +01:00
Matthias Dieter Wallnöfer
f0bc02d74c
Revert "s4:provision Improve the handling of provision errors"
...
This reverts partially commit 027123199e
.
Andrew, this is not Python 2.4+ compatible
2010-03-13 12:37:45 +01:00
Stefan Metzmacher
b52b357ede
s4:torture/rpc/spoolss.c: fix compiler warnings
...
metze
2010-03-13 08:20:24 +01:00
Günther Deschner
8f07737714
s4-smbtorture: warn on unexpected devicenames in spoolss devicemode test.
...
Guenther
2010-03-13 02:26:59 +01:00