ira/wip.git
13 years agos3-privs Remove unused function
Andrew Bartlett [Mon, 30 Aug 2010 06:29:05 +0000 (16:29 +1000)]
s3-privs Remove unused function

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Overhaul PRIVILEGE_SET handling, avoid dealing with the bitmap
Andrew Bartlett [Mon, 30 Aug 2010 05:38:18 +0000 (15:38 +1000)]
s3-privs Overhaul PRIVILEGE_SET handling, avoid dealing with the bitmap

This avoids us dealing with the privilege bitmap in the LSA server, and
overhauls much of the rest of the handling to be currnet with the modern
world of talloc.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Hide the bitmap-based grant_privilege and revoke_privilege
Andrew Bartlett [Mon, 30 Aug 2010 05:27:40 +0000 (15:27 +1000)]
s3-privs Hide the bitmap-based grant_privilege and revoke_privilege

The new wrappers avoid anything but the core privileges code
dealing with the bitmap values directly.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Make privilege_enum_sids() take an LUID, not a bitmap
Andrew Bartlett [Mon, 30 Aug 2010 04:17:02 +0000 (14:17 +1000)]
s3-privs Make privilege_enum_sids() take an LUID, not a bitmap

This moves one more privileges call away from direct bitmap manipuation.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Expose sec_privilege_mask()
Andrew Bartlett [Mon, 30 Aug 2010 04:16:36 +0000 (14:16 +1000)]
libcli/security Expose sec_privilege_mask()

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security make sec_privilege_id() return SEC_PRIV_INVALID on failure.
Andrew Bartlett [Mon, 30 Aug 2010 04:00:50 +0000 (14:00 +1000)]
libcli/security make sec_privilege_id() return SEC_PRIV_INVALID on failure.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Remove unused functions and constants.
Andrew Bartlett [Mon, 30 Aug 2010 03:33:19 +0000 (13:33 +1000)]
libcli/security Remove unused functions and constants.

All the callers to these functions have been removed or reworked.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Rework access_check_object() to take two privileges
Andrew Bartlett [Mon, 30 Aug 2010 03:30:38 +0000 (13:30 +1000)]
s3-privs Rework access_check_object() to take two privileges

This allows the privileges bitmap to be used only when setting
privileges, and uses an the LUID constant for all 'does this user
have this privilege' operations.

The advantage is that we now only need one API to determine if a
token has a privilege, and much less code needs to know what type
is used for the underlying bitmap.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Rename all privilege bitmaps constants
Andrew Bartlett [Mon, 30 Aug 2010 03:28:19 +0000 (13:28 +1000)]
libcli/security Rename all privilege bitmaps constants

The idea here to to make it very clear how they differ from the
enumerated LUID values.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Rework privilege enumeration to also use new DB format
Andrew Bartlett [Mon, 30 Aug 2010 03:24:43 +0000 (13:24 +1000)]
s3-privs Rework privilege enumeration to also use new DB format

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Remove luid_to_se_priv() and luid_to_privilege_name()
Andrew Bartlett [Mon, 30 Aug 2010 03:17:48 +0000 (13:17 +1000)]
libcli/security Remove luid_to_se_priv() and luid_to_privilege_name()

These functions duplicate other functions in the merged code.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Directly manipulate the privileges bitmap.
Andrew Bartlett [Mon, 30 Aug 2010 03:14:40 +0000 (13:14 +1000)]
s3-privs Directly manipulate the privileges bitmap.

There is no longer any reason to go via the se_ functions to
manipulate this bitmap.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Add an invalid LUID privilege value
Andrew Bartlett [Mon, 30 Aug 2010 03:09:29 +0000 (13:09 +1000)]
libcli/security Add an invalid LUID privilege value

This helps code that may not want to specify any privilege

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Improve dump of privileges: Just walk the table
Andrew Bartlett [Mon, 30 Aug 2010 03:06:18 +0000 (13:06 +1000)]
libcli/security Improve dump of privileges:  Just walk the table

This removes some logic recently added that was just too smart - it
is easier to just walk the table and do a bit match here.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Convert from user_has_privileges() -> security_token_has_privilege()
Andrew Bartlett [Mon, 30 Aug 2010 03:04:27 +0000 (13:04 +1000)]
s3-privs Convert from user_has_privileges() -> security_token_has_privilege()

This new call is available in the merged privileges code, and
takes an enum as the parameter, rather than a bitmask.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Remove a pointer from grant_privilege()
Andrew Bartlett [Mon, 30 Aug 2010 02:59:38 +0000 (12:59 +1000)]
s3-privs Remove a pointer from grant_privilege()

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Remove pointer indirection from se_priv_to_privilege_set()
Andrew Bartlett [Mon, 30 Aug 2010 02:50:49 +0000 (12:50 +1000)]
s3-privs Remove pointer indirection from se_priv_to_privilege_set()

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Call security_token_set_privilege() rather than manual assignment
Andrew Bartlett [Mon, 30 Aug 2010 02:47:29 +0000 (12:47 +1000)]
s3-privs Call security_token_set_privilege() rather than manual assignment

This avoids as much direct modifiction of the bitmask as possible.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Remove a pointer indirection from revoke_privilege()
Andrew Bartlett [Mon, 30 Aug 2010 02:44:08 +0000 (12:44 +1000)]
s3-privs Remove a pointer indirection from revoke_privilege()

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Don't export privs[] as a global variable
Andrew Bartlett [Fri, 27 Aug 2010 02:19:09 +0000 (12:19 +1000)]
libcli/security Don't export privs[] as a global variable

Instead, provide access functions for the LSA and net sam callers
for the information they need.

They still only enumerate the first 8 privileges that have traditionally
been exposed.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-lsa Use sec_privilege_id() to lookup name to LUID
Andrew Bartlett [Fri, 27 Aug 2010 02:12:10 +0000 (12:12 +1000)]
s3-lsa Use sec_privilege_id() to lookup name to LUID

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Merge privilege lists from source3 and source4
Andrew Bartlett [Fri, 27 Aug 2010 01:56:37 +0000 (11:56 +1000)]
libcli/security Merge privilege lists from source3 and source4

The LSA enumeration in source3 will not show the new privileges,
but otherwise, they are now in common, and can be set by name.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Return number of entries in the old source3 list
Andrew Bartlett [Fri, 27 Aug 2010 01:52:51 +0000 (11:52 +1000)]
libcli/security Return number of entries in the old source3 list

This ensures there isn't a behaviour change when the source3 list is combined
with the longer source4 list.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/privileges Simplify get_privilege_luid() to return just the enum
Andrew Bartlett [Fri, 27 Aug 2010 01:27:57 +0000 (11:27 +1000)]
libcli/privileges Simplify get_privilege_luid() to return just the enum

As Samba only deals with the lower 32 bits of the LUID, just return those
and let the LSA layer deal with the upper 0 bits.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Don't memcpy a uint64_t value, just assign it.
Andrew Bartlett [Fri, 27 Aug 2010 01:26:20 +0000 (11:26 +1000)]
libcli/security Don't memcpy a uint64_t value, just assign it.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Use ARRAY_SIZE() consistantly.
Andrew Bartlett [Fri, 27 Aug 2010 00:52:38 +0000 (10:52 +1000)]
libcli/security Use ARRAY_SIZE() consistantly.

This avoids the use of SE_END, and has all callers walking the
array using the same termination condition.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Fix and clarify privilege manipulation function comments
Andrew Bartlett [Fri, 27 Aug 2010 00:30:18 +0000 (10:30 +1000)]
libcli/security Fix and clarify privilege manipulation function comments

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Make the two privileges tables share a common struct definition
Andrew Bartlett [Fri, 27 Aug 2010 00:21:13 +0000 (10:21 +1000)]
libcli/security Make the two privileges tables share a common struct definition

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Move source4/ privileges code into the common libcli/security
Andrew Bartlett [Thu, 26 Aug 2010 23:35:55 +0000 (09:35 +1000)]
libcli/security Move source4/ privileges code into the common libcli/security

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Move manual prototypes to common privileges.h
Andrew Bartlett [Thu, 26 Aug 2010 23:22:31 +0000 (09:22 +1000)]
s3-privs Move manual prototypes to common privileges.h

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Inline dump_se_priv into callers now that it's just a uint64_t
Andrew Bartlett [Fri, 27 Aug 2010 00:04:05 +0000 (10:04 +1000)]
s3-privs Inline dump_se_priv into callers now that it's just a uint64_t

The previous 128 bit structure needed this helper function.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Use talloc_realloc() not TALLOC_REALLOC_ARRAY()
Andrew Bartlett [Thu, 26 Aug 2010 23:50:31 +0000 (09:50 +1000)]
libcli/security Use talloc_realloc() not TALLOC_REALLOC_ARRAY()

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Use C99 types
Andrew Bartlett [Thu, 26 Aug 2010 23:50:12 +0000 (09:50 +1000)]
libcli/security Use C99 types

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Use true and false, not True and False
Andrew Bartlett [Thu, 26 Aug 2010 23:41:32 +0000 (09:41 +1000)]
libcli/security Use true and false, not True and False

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Move source3/ privileges implmentation into common
Andrew Bartlett [Thu, 26 Aug 2010 22:56:15 +0000 (08:56 +1000)]
s3-privs Move source3/ privileges implmentation into common

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Rename structure elements for greater clarity
Andrew Bartlett [Thu, 26 Aug 2010 12:49:27 +0000 (22:49 +1000)]
s3-privs Rename structure elements for greater clarity

It is important to make clear which is the LUID and which
is the Samba-only bitmap mask.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs More clarity in variable names
Andrew Bartlett [Thu, 26 Aug 2010 12:35:35 +0000 (22:35 +1000)]
s3-privs More clarity in variable names

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Rename mask -> privilege_mask to be more clear
Andrew Bartlett [Thu, 26 Aug 2010 12:30:26 +0000 (22:30 +1000)]
s3-privs Rename mask -> privilege_mask to be more clear

After SE_PRIV was removed, it became less clear what these
parameters were for.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3:auth Remove NT_USER_TOKEN
Andrew Bartlett [Thu, 26 Aug 2010 12:08:22 +0000 (22:08 +1000)]
s3:auth Remove NT_USER_TOKEN

The all UPPER case typedef is no longer the preferred Samba style
and this makes it easier to see that this is the IDL-derivied structure

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-auth Change struct nt_user_token -> struct security_token
Andrew Bartlett [Thu, 26 Aug 2010 10:04:11 +0000 (20:04 +1000)]
s3-auth Change struct nt_user_token -> struct security_token

This common structure is defined in security.idl

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-auth Change type of num_sids to uint32_t
Andrew Bartlett [Thu, 26 Aug 2010 10:54:13 +0000 (20:54 +1000)]
s3-auth Change type of num_sids to uint32_t

size_t is overkill here, and in struct security_token in the num_sids
is uint32_t.

This includes a change to the prototype of add_sid_to_array()
and add_sid_to_array_unique(), which has had a number of
consequnetial changes as I try to sort out all the callers using
a pointer to the number of sids.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agosecurity.idl Add comments
Andrew Bartlett [Thu, 26 Aug 2010 09:42:01 +0000 (19:42 +1000)]
security.idl Add comments

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agosecurity.idl Update Windows privileges list to Win2008R2
Andrew Bartlett [Thu, 26 Aug 2010 09:21:53 +0000 (19:21 +1000)]
security.idl Update Windows privileges list to Win2008R2

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Only store low bits of luid in privileges table
Andrew Bartlett [Thu, 26 Aug 2010 09:20:32 +0000 (19:20 +1000)]
s3-privs Only store low bits of luid in privileges table

Samba only uses the low bits, and this makes the code simpler.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos4-privs Add a lookup by index of privilages
Andrew Bartlett [Thu, 26 Aug 2010 08:38:59 +0000 (18:38 +1000)]
s4-privs Add a lookup by index of privilages

Now that privileges are no longer given luid values sequentially,
we need another way to look them up for enumeration.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agoprivs Add my Copyright
Andrew Bartlett [Thu, 26 Aug 2010 08:38:16 +0000 (18:38 +1000)]
privs Add my Copyright

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agosecurity.idl clarify which privilages are LUID and bitmap values
Andrew Bartlett [Thu, 26 Aug 2010 06:04:53 +0000 (16:04 +1000)]
security.idl clarify which privilages are LUID and bitmap values

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Remove comment already moved to security.idl
Andrew Bartlett [Thu, 26 Aug 2010 06:03:41 +0000 (16:03 +1000)]
s3-privs Remove comment already moved to security.idl

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Use constants from security.idl
Andrew Bartlett [Thu, 26 Aug 2010 06:02:12 +0000 (16:02 +1000)]
s3-privs Use constants from security.idl

The values in security.idl have been updated to match these.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos4-privs Remove link between enum sec_privilege and the privilege bitmap
Andrew Bartlett [Thu, 26 Aug 2010 05:56:21 +0000 (15:56 +1000)]
s4-privs Remove link between enum sec_privilege and the privilege bitmap

This allows us to set the enum sec_privilege constants to the LUID
values that are seen from windows, which we need to match, in order
to preserve the support for the NT Print Migrator tool after a merge
with the source3/ privileges code.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Further changes to remove SE_PRIV
Andrew Bartlett [Thu, 26 Aug 2010 04:37:00 +0000 (14:37 +1000)]
s3-privs Further changes to remove SE_PRIV

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agoprivs Move privilege bitmasks to security.idl
Andrew Bartlett [Fri, 27 Aug 2010 02:44:35 +0000 (12:44 +1000)]
privs Move privilege bitmasks to security.idl

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3:privs Change to new host endian neutral privilages tdb format
Andrew Bartlett [Thu, 26 Aug 2010 00:35:45 +0000 (10:35 +1000)]
s3:privs Change to new host endian neutral privilages tdb format

These values are stored in account_policy.tdb, and the old format,
using a 128 bit bitmap was not endian neutral.

The previous endian-dependent format was introduced in
46e5effea948931509283cb84b27007d34b521c8
replacing a 32 bit number which was used at the time.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3:Change SE_PRIV to uint64_t
Andrew Bartlett [Wed, 25 Aug 2010 22:49:28 +0000 (08:49 +1000)]
s3:Change SE_PRIV to uint64_t

This removes the SE_PRIV typedef

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3:privileges Change SE_PRIV to be just a uint64_t
Andrew Bartlett [Tue, 24 Aug 2010 04:47:26 +0000 (14:47 +1000)]
s3:privileges Change SE_PRIV to be just a uint64_t

We don't need 128 possible privileges here, as we only use 12.

This reverts some of 46e5effea948931509283cb84b27007d34b521c8
by Jerry back in 2005, where he introduced the SE_PRIV structure
to replace the uint32_t used at the time.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolib/replace:wscript - don't check twice for type "bool"
Matthias Dieter Wallnöfer [Sat, 11 Sep 2010 06:42:10 +0000 (08:42 +0200)]
lib/replace:wscript - don't check twice for type "bool"

13 years agolib/replace:wscript - attempt to fix the features detection on Tru64
Matthias Dieter Wallnöfer [Sat, 11 Sep 2010 06:22:09 +0000 (08:22 +0200)]
lib/replace:wscript - attempt to fix the features detection on Tru64

Hopefully now we detect the built-in "socklen_t"

https://bugs.internet2.edu/jira/browse/SSPCPP-114
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V50_HTML/MAN/MAN5/0001____.HTM

13 years agoAdd check missing from previous patch after talloc_strdup().
Jeremy Allison [Sat, 11 Sep 2010 06:33:18 +0000 (23:33 -0700)]
Add check missing from previous patch after talloc_strdup().

Jeremy.

13 years agoFactor out the recent changes into a function - check_parent_exists().
Jeremy Allison [Sat, 11 Sep 2010 06:28:15 +0000 (23:28 -0700)]
Factor out the recent changes into a function - check_parent_exists().
Fix this to ensure that if "start" is manipulated, then "dirpath"
is changed also.

Ensures that when the path:

/a/long/file/name/path.txt

is processed, we first stat:

/a/long/file/name/path.txt

and if this fails, we try to stat:

/a/long/file/name

if this path exists (the normal case when creating a new
entry in a directory) then we no longer do the individual
path name walk, but only do case insensitive lookup on the
last component. If the stat fails we do the full pathname
walk as normal in 3.5.x and below. Metze, examine this
change for your back-port.

Jeremy.

13 years agos3: Simplify the logic in generate_krb5_ccache
Volker Lendecke [Fri, 10 Sep 2010 13:07:28 +0000 (15:07 +0200)]
s3: Simplify the logic in generate_krb5_ccache

gd, jra, others, please check!

13 years agos3/winbind: use mono time for startup timeout check
Björn Jacke [Fri, 10 Sep 2010 19:36:20 +0000 (21:36 +0200)]
s3/winbind: use mono time for startup timeout check

13 years agolibreplace: clock_gettime sets errno
Björn Jacke [Fri, 10 Sep 2010 19:03:17 +0000 (21:03 +0200)]
libreplace: clock_gettime sets errno

13 years agos4/pvfs: use monotonic time for this timeout
Björn Jacke [Fri, 10 Sep 2010 18:46:10 +0000 (20:46 +0200)]
s4/pvfs: use monotonic time for this timeout

13 years agos4/ldap: use time_mono for reconnect timeout
Björn Jacke [Fri, 10 Sep 2010 18:39:20 +0000 (20:39 +0200)]
s4/ldap: use time_mono for reconnect timeout

13 years agos4/torture: use time_mono for timeouts
Björn Jacke [Fri, 10 Sep 2010 18:28:41 +0000 (20:28 +0200)]
s4/torture: use time_mono for timeouts

13 years agos4/torture: use time_mono for delta time
Björn Jacke [Fri, 10 Sep 2010 18:25:19 +0000 (20:25 +0200)]
s4/torture: use time_mono for delta time

13 years agos3-selftest: add print_test_extended (as called from RPC-PRINTER) to knownfail list.
Günther Deschner [Fri, 10 Sep 2010 21:06:46 +0000 (23:06 +0200)]
s3-selftest: add print_test_extended (as called from RPC-PRINTER) to knownfail list.

Guenther

13 years agos4:client/client.c - fix wrong return codes in "do_connect"
Matthias Dieter Wallnöfer [Fri, 10 Sep 2010 20:39:39 +0000 (22:39 +0200)]
s4:client/client.c - fix wrong return codes in "do_connect"

Detected by the Solaris cc compiler.

13 years agos4:lib/policy/gp_filesys.c - remove dead code
Matthias Dieter Wallnöfer [Fri, 10 Sep 2010 20:26:24 +0000 (22:26 +0200)]
s4:lib/policy/gp_filesys.c - remove dead code

Found out by Solaris cc

13 years agos4:torture/locktest.c - add a cast in order to quiet a warning on Solaris cc
Matthias Dieter Wallnöfer [Fri, 10 Sep 2010 20:35:10 +0000 (22:35 +0200)]
s4:torture/locktest.c - add a cast in order to quiet a warning on Solaris cc

13 years agos4:libcli/wrepl/winsrepl.c - add more "char *" casts in order to suppress Solaris...
Matthias Dieter Wallnöfer [Fri, 10 Sep 2010 20:22:14 +0000 (22:22 +0200)]
s4:libcli/wrepl/winsrepl.c - add more "char *" casts in order to suppress Solaris warnings

13 years agos3/s4:libcli/tstream - add more "char *" casts in order to suppress Solaris warnings
Matthias Dieter Wallnöfer [Fri, 10 Sep 2010 20:22:14 +0000 (22:22 +0200)]
s3/s4:libcli/tstream - add more "char *" casts in order to suppress Solaris warnings

13 years agos4:torture/ntp/ntp_signd.c - add more "char *" casts in order to suppress Solaris...
Matthias Dieter Wallnöfer [Fri, 10 Sep 2010 20:22:14 +0000 (22:22 +0200)]
s4:torture/ntp/ntp_signd.c - add more "char *" casts in order to suppress Solaris warnings

13 years agos3-printing: fix non-ads build after prototype changes.
Günther Deschner [Fri, 10 Sep 2010 20:40:46 +0000 (22:40 +0200)]
s3-printing: fix non-ads build after prototype changes.

Guenther

13 years agos3: Simplify generate_krb5_ccache slightly
Volker Lendecke [Fri, 10 Sep 2010 12:34:19 +0000 (14:34 +0200)]
s3: Simplify generate_krb5_ccache slightly

strequal deals with a NULL string input just fine

13 years agoCheck all SMB_MALLOC returns correctly. Found by Andreas Moroder <andreas.moroder...
Jeremy Allison [Fri, 10 Sep 2010 18:56:26 +0000 (11:56 -0700)]
Check all SMB_MALLOC returns correctly. Found by Andreas Moroder <andreas.moroder@gmx.net>.

Jeremy

13 years agos4:torture/rpc/winreg.c - hopefully this attempt fixes Solaris "cc" on the buildfarm
Matthias Dieter Wallnöfer [Fri, 10 Sep 2010 17:28:07 +0000 (19:28 +0200)]
s4:torture/rpc/winreg.c - hopefully this attempt fixes Solaris "cc" on the buildfarm

The Solaris "cc" incompatiblity on this codepart seems to be harder to fix than
it looks like.

13 years agos4:getncchanges_change_master - also in this call "i" needs to be unsigned
Matthias Dieter Wallnöfer [Fri, 10 Sep 2010 17:17:25 +0000 (19:17 +0200)]
s4:getncchanges_change_master - also in this call "i" needs to be unsigned

13 years agos3: auth.krb5ccname and auth.unix_username are both fstrings
Volker Lendecke [Fri, 10 Sep 2010 10:49:32 +0000 (12:49 +0200)]
s3: auth.krb5ccname and auth.unix_username are both fstrings

There's no point in checking for != NULL

13 years agoselftest/s3-selftest.sh: knownfailure filtering for non-build-farm make test
Stefan Metzmacher [Wed, 8 Sep 2010 15:56:33 +0000 (17:56 +0200)]
selftest/s3-selftest.sh: knownfailure filtering for non-build-farm make test

metze

13 years agos3:torture: fix printf output, lines can't start with lower case "test"
Stefan Metzmacher [Wed, 8 Sep 2010 15:54:29 +0000 (17:54 +0200)]
s3:torture: fix printf output, lines can't start with lower case "test"

metze

13 years agos3:torture: fix run_uid_regression_test
Stefan Metzmacher [Wed, 8 Sep 2010 15:55:12 +0000 (17:55 +0200)]
s3:torture: fix run_uid_regression_test

metze

13 years agos3-errormap: map ERRSRV/ERRbaduid to NT_STATUS_USER_SESSION_DELETED
Stefan Metzmacher [Wed, 8 Sep 2010 15:53:47 +0000 (17:53 +0200)]
s3-errormap: map ERRSRV/ERRbaduid to NT_STATUS_USER_SESSION_DELETED

metze

13 years agos4-errormap: map ERRSRV/ERRbaduid to NT_STATUS_USER_SESSION_DELETED
Stefan Metzmacher [Wed, 8 Sep 2010 15:53:47 +0000 (17:53 +0200)]
s4-errormap: map ERRSRV/ERRbaduid to NT_STATUS_USER_SESSION_DELETED

metze

13 years agos4:provision: remember the setup directory if it wasn't the default
Stefan Metzmacher [Fri, 10 Sep 2010 04:36:02 +0000 (06:36 +0200)]
s4:provision: remember the setup directory if it wasn't the default

This fixes make test without a make install.

metze

13 years agos3-spoolss: Fix _spoolss_GetPrinter().
Günther Deschner [Fri, 10 Sep 2010 14:55:23 +0000 (16:55 +0200)]
s3-spoolss: Fix _spoolss_GetPrinter().

In the error case, we need to TALLOC_FREE(r->out.info), don't ask :-)

Guenther

13 years agos3-spoolss: Don't leak memory on the session counter list.
Andreas Schneider [Fri, 10 Sep 2010 14:06:24 +0000 (16:06 +0200)]
s3-spoolss: Don't leak memory on the session counter list.

Thanks Günther, please check.

13 years agos3-spoolss: Allow multiple client backchannels.
Simo Sorce [Thu, 1 Jul 2010 23:39:57 +0000 (19:39 -0400)]
s3-spoolss: Allow multiple client backchannels.

When we run spoolssd we need to support multiple clients connecting.

Signed-off-by: Andreas Schneider <asn@samba.org>
13 years agos3-spoolss: Split function to send notification.
Simo Sorce [Wed, 30 Jun 2010 22:35:29 +0000 (18:35 -0400)]
s3-spoolss: Split function to send notification.

More digestible this way.

Signed-off-by: Andreas Schneider <asn@samba.org>
13 years agos3-spoolss: Use a single structure for all the back channel data.
Simo Sorce [Wed, 30 Jun 2010 18:19:43 +0000 (14:19 -0400)]
s3-spoolss: Use a single structure for all the back channel data.

Signed-off-by: Andreas Schneider <asn@samba.org>
13 years agos3-spoolss: Rename Printer_entry to struct printer_handle.
Simo Sorce [Wed, 30 Jun 2010 19:32:15 +0000 (15:32 -0400)]
s3-spoolss: Rename Printer_entry to struct printer_handle.

Signed-off-by: Andreas Schneider <asn@samba.org>
13 years agos3-spoolss: Move Printer_entry to srv_spoolss_nt.c
Simo Sorce [Wed, 30 Jun 2010 19:11:41 +0000 (15:11 -0400)]
s3-spoolss: Move Printer_entry to srv_spoolss_nt.c

It is used only there, and it is a good idea to make this one private and
opaque to the rest of the code.

Signed-off-by: Andreas Schneider <asn@samba.org>
13 years agos3-spoolss: Allocate printer entries on the pipe struct.
Simo Sorce [Wed, 30 Jun 2010 16:19:41 +0000 (12:19 -0400)]
s3-spoolss: Allocate printer entries on the pipe struct.

Signed-off-by: Andreas Schneider <asn@samba.org>
13 years agos3-spoolss: Rename session counter structure and use talloc.
Simo Sorce [Wed, 30 Jun 2010 16:07:44 +0000 (12:07 -0400)]
s3-spoolss: Rename session counter structure and use talloc.

Signed-off-by: Andreas Schneider <asn@samba.org>
13 years agos3-dsgetdcname: cleanup receive_getdc_response a little.
Günther Deschner [Wed, 3 Dec 2008 09:40:04 +0000 (10:40 +0100)]
s3-dsgetdcname: cleanup receive_getdc_response a little.

Guenther

13 years agos3-build: use proper RPC_X_OBJ target names.
Günther Deschner [Fri, 10 Sep 2010 09:51:32 +0000 (11:51 +0200)]
s3-build: use proper RPC_X_OBJ target names.

Guenther

13 years agos3-waf: use proper RPC_X_SRC names.
Günther Deschner [Fri, 10 Sep 2010 09:49:49 +0000 (11:49 +0200)]
s3-waf: use proper RPC_X_SRC names.

This allows to build using waf without --enable-developer and should also fix
support for rpc server modules.

Guenther

13 years agos4/fsmo: Change return type from NTSTATUS to WERROR for drepl_takeFSMOrole
Anatoliy Atanasov [Fri, 10 Sep 2010 10:44:20 +0000 (13:44 +0300)]
s4/fsmo: Change return type from NTSTATUS to WERROR for drepl_takeFSMOrole

This removed an unnecessary conversion of the return type in
drepl_take_FSMO_role.

13 years agos4/fsmo: Fix callback declaration
Anatoliy Atanasov [Fri, 10 Sep 2010 06:00:56 +0000 (09:00 +0300)]
s4/fsmo: Fix callback declaration

13 years agos4-drs: return DRSUAPI_EXOP_ERR_SUCCESS in extended_ret
Kamen Mazdrashki [Thu, 9 Sep 2010 23:05:27 +0000 (02:05 +0300)]
s4-drs: return DRSUAPI_EXOP_ERR_SUCCESS in extended_ret

in case we are handling extended operation.

It seems that windows accept both DRSUAPI_EXOP_ERR_SUCCESS
and DRSUAPI_EXOP_ERR_NONE, but Samba is a little bit
more picky on this.