abartlet/samba.git/.git
13 years agos4-dsdb Change debug levels for startup messages session-info
Andrew Bartlett [Thu, 9 Sep 2010 05:20:48 +0000 (15:20 +1000)]
s4-dsdb Change debug levels for startup messages

We should make the 'common' error not show up, but the unusal case fatal.

Andrew Bartlett

13 years agos4-setup Make krb5.conf use DNS by default
Andrew Bartlett [Thu, 9 Sep 2010 04:58:06 +0000 (14:58 +1000)]
s4-setup Make krb5.conf use DNS by default

We set up our DNS pretty well these days, and I think the previous setting
was only there because Andrew Kroeger copied this out of our selftest code
in bf3f3af92677bce8f03b0dd2be552d6c8c730ca1.

Andrew Bartlett

13 years agolibcli/security Remove unused SE_NONE define
Andrew Bartlett [Fri, 3 Sep 2010 23:32:21 +0000 (09:32 +1000)]
libcli/security Remove unused SE_NONE define

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Move 'private' privileges functions to another header
Andrew Bartlett [Fri, 3 Sep 2010 23:23:12 +0000 (09:23 +1000)]
libcli/security Move 'private' privileges functions to another header

These functions work on the bitmap, and are only exposed because
the source3/ privileges storage uses the bitmap in account_policy.tdb

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-samr Explian better the use of two privileges in this call
Andrew Bartlett [Fri, 3 Sep 2010 23:18:05 +0000 (09:18 +1000)]
s3-samr Explian better the use of two privileges in this call

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Remove 'always true' return from se_priv_put_all_privileges
Andrew Bartlett [Fri, 3 Sep 2010 23:16:23 +0000 (09:16 +1000)]
libcli/security Remove 'always true' return from se_priv_put_all_privileges

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-util_sid Tidy up global struct security_token
Andrew Bartlett [Fri, 3 Sep 2010 22:37:21 +0000 (08:37 +1000)]
s3-util_sid Tidy up global struct security_token

This no longer needs to be global, and should be const.  We now also
init it with the C99 style initialisers.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos4-rpc_server Put all 'logon failure' messages at the same debug level 4
Andrew Bartlett [Fri, 3 Sep 2010 21:02:38 +0000 (07:02 +1000)]
s4-rpc_server Put all 'logon failure' messages at the same debug level 4

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/auth Failure to find the cached session key for SCHANNEL isn't level 0
Andrew Bartlett [Fri, 3 Sep 2010 21:01:38 +0000 (07:01 +1000)]
libcli/auth Failure to find the cached session key for SCHANNEL isn't level 0

This happens all the time, particularly now that we don't keep the
db around after a reboot.  Don't scare the admins with the level 0.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Add const
Andrew Bartlett [Fri, 3 Sep 2010 10:30:50 +0000 (20:30 +1000)]
s3-privs Add const

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privs Remove extra pointer on privilege mask
Andrew Bartlett [Fri, 3 Sep 2010 10:30:16 +0000 (20:30 +1000)]
s3-privs Remove extra pointer on privilege mask

Now that this is a scalar, this isn't required.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-privileges: add handling of both old and new formats in database
Andrew Tridgell [Fri, 3 Sep 2010 06:33:41 +0000 (16:33 +1000)]
s3-privileges: add handling of both old and new formats in database

We update privileges on a per-record basis instead of all at once, as
this maintains maximum compatibility is someone uses old tools with a
new version of Samba. The also auto-detects the byte order of the old
entries in the database, and copes with either native or reversed byte
order.

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

13 years agos4-lsa: privilege IDs should use the enum, not an int
Andrew Tridgell [Thu, 2 Sep 2010 04:15:13 +0000 (14:15 +1000)]
s4-lsa: privilege IDs should use the enum, not an int

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

13 years agoprivileges: privilege luids are not all below 64
Andrew Tridgell [Thu, 2 Sep 2010 04:14:51 +0000 (14:14 +1000)]
privileges: privilege luids are not all below 64

the ones brought across from s3 have higher values

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

13 years agolibcli/security Make sec_privilege_from_index() return SEC_PRIV_INVALID on failure
Andrew Bartlett [Mon, 30 Aug 2010 23:28:51 +0000 (09:28 +1000)]
libcli/security Make sec_privilege_from_index() return SEC_PRIV_INVALID on failure

This is clearer and more consistent than using a magic -1 return

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agolibcli/security Remove unused declarations from privileges.h
Andrew Bartlett [Mon, 30 Aug 2010 23:20:39 +0000 (09:20 +1000)]
libcli/security Remove unused declarations from privileges.h

Signed-off-by: Andrew Tridgell <tridge@samba.org>
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 agos3: Remove "mem_ctx" from a few functions
Volker Lendecke [Thu, 9 Sep 2010 02:12:21 +0000 (19:12 -0700)]
s3: Remove "mem_ctx" from a few functions

13 years agos3: Remove "mem_ctx" from wcache_save_creds()
Volker Lendecke [Thu, 9 Sep 2010 02:09:21 +0000 (19:09 -0700)]
s3: Remove "mem_ctx" from wcache_save_creds()

13 years agos3: Remove "mem_ctx" from lookup_cached_name()
Volker Lendecke [Thu, 9 Sep 2010 02:03:15 +0000 (19:03 -0700)]
s3: Remove "mem_ctx" from lookup_cached_name()

13 years agos3: Remove a nested if-statement
Volker Lendecke [Thu, 9 Sep 2010 02:01:11 +0000 (19:01 -0700)]
s3: Remove a nested if-statement

13 years agos3: Fill in workstation in winbindd_pam_auth_crap_send
Volker Lendecke [Thu, 9 Sep 2010 01:09:07 +0000 (18:09 -0700)]
s3: Fill in workstation in winbindd_pam_auth_crap_send

13 years agos3: Fill in domain in winbindd_pam_auth_crap_send
Volker Lendecke [Thu, 9 Sep 2010 01:07:31 +0000 (18:07 -0700)]
s3: Fill in domain in winbindd_pam_auth_crap_send

13 years agos3: Remove redundant flag checks
Volker Lendecke [Thu, 9 Sep 2010 00:56:55 +0000 (17:56 -0700)]
s3: Remove redundant flag checks

We're checking these in the parent already (winbindd_pam_auth_send and
winbindd_pam_auth_crap_send). No point in doing it in the child as well

13 years agos3: Remove unused arg "user_sid" from winbindd_store_creds
Volker Lendecke [Wed, 8 Sep 2010 23:58:21 +0000 (16:58 -0700)]
s3: Remove unused arg "user_sid" from winbindd_store_creds

All callers have passed in NULL

13 years agos3: Remove unused winbindd_update_creds_by_sid
Volker Lendecke [Wed, 8 Sep 2010 23:54:50 +0000 (16:54 -0700)]
s3: Remove unused winbindd_update_creds_by_sid

13 years agos3: Remove unused winbindd_dual_show_sequence()
Volker Lendecke [Wed, 8 Sep 2010 17:04:53 +0000 (10:04 -0700)]
s3: Remove unused winbindd_dual_show_sequence()

13 years agoDon't rely on the underlying ACL modules to enforce share level
Jeremy Allison [Thu, 9 Sep 2010 03:54:38 +0000 (20:54 -0700)]
Don't rely on the underlying ACL modules to enforce share level
security when setting ACLs, check at the call level as well.

Jeremy.

13 years agoOptimization suggested by Metze. Without this patch,
Jeremy Allison [Wed, 8 Sep 2010 23:55:24 +0000 (16:55 -0700)]
Optimization suggested by Metze. Without this patch,
FindFirst with 'path\to\some\dir\with\files\*'

triggers the following stat calls

path\to\some\dir\with\files\* => ENOENT
path\
path\to\
path\to\some\
path\to\some\dir\
path\to\some\dir\with\
path\to\some\dir\with\files\
path\to\some\dir\with\files\* => ENOENT

With this patch we get :

path\to\some\dir\with\files\* => ENOENT
path\to\some\dir\with\files = OK

Jeremy.

13 years agos3: "== false" looks wrong :-)
Volker Lendecke [Wed, 8 Sep 2010 13:29:32 +0000 (15:29 +0200)]
s3: "== false" looks wrong :-)

13 years agoFix warnings caused by double ";;" at the end of the time_mono() fixes.
Jeremy Allison [Wed, 8 Sep 2010 22:13:45 +0000 (15:13 -0700)]
Fix warnings caused by double ";;" at the end of the time_mono() fixes.

13 years agos4-waf: fix bin/python/samba/dcerpc/nbt.so.
Günther Deschner [Wed, 8 Sep 2010 21:23:09 +0000 (23:23 +0200)]
s4-waf: fix bin/python/samba/dcerpc/nbt.so.

Thanks to Brad Hards for pointing this out.

Guenther

13 years agowafsamba: Eliminate sys.path updating if installing to a standard python
Jelmer Vernooij [Wed, 8 Sep 2010 20:45:12 +0000 (22:45 +0200)]
wafsamba: Eliminate sys.path updating if installing to a standard python
path.

13 years agos3: use time_mono throughout in smbget
Björn Jacke [Wed, 8 Sep 2010 20:29:00 +0000 (22:29 +0200)]
s3: use time_mono throughout in smbget

13 years agos3/ldap: use monotonic clock for timeouts in smbldap
Björn Jacke [Mon, 6 Sep 2010 23:04:10 +0000 (01:04 +0200)]
s3/ldap: use monotonic clock for timeouts in smbldap

tevent would need monotonic clock features to make also smbldap's idle handling
aware of backward clock jumps. Other areas in smbldap are clock jump save now.

13 years agosetup: Use standard octal ints rather than harcoding.
Jelmer Vernooij [Wed, 8 Sep 2010 20:11:55 +0000 (22:11 +0200)]
setup: Use standard octal ints rather than harcoding.

13 years agopopt_common: Add missing dependency on libsamba-hostconfig.
Jelmer Vernooij [Wed, 8 Sep 2010 20:11:23 +0000 (22:11 +0200)]
popt_common: Add missing dependency on libsamba-hostconfig.

13 years agos3: Make winbind_add_failed_connection_entry static
Volker Lendecke [Wed, 8 Sep 2010 10:07:42 +0000 (12:07 +0200)]
s3: Make winbind_add_failed_connection_entry static

13 years agos3: Fix a typo
Volker Lendecke [Wed, 8 Sep 2010 18:59:46 +0000 (20:59 +0200)]
s3: Fix a typo

13 years agos4-smbtorture: add torture ndr nbt testsuite.
Günther Deschner [Wed, 8 Sep 2010 09:18:40 +0000 (11:18 +0200)]
s4-smbtorture: add torture ndr nbt testsuite.

Guenther

13 years agonbt: add nbt_netlogon_response2 to IDL.
Günther Deschner [Tue, 7 Sep 2010 20:41:06 +0000 (22:41 +0200)]
nbt: add nbt_netlogon_response2 to IDL.

Guenther

13 years agonbt: add NETLOGON_LOGON_REQUEST.
Günther Deschner [Tue, 7 Sep 2010 11:16:27 +0000 (13:16 +0200)]
nbt: add NETLOGON_LOGON_REQUEST.

Guenther

13 years agonbt: add decode_nbt_netlogon_packet() to IDL.
Günther Deschner [Wed, 8 Sep 2010 09:19:48 +0000 (11:19 +0200)]
nbt: add decode_nbt_netlogon_packet() to IDL.

Guenther

13 years agos3-nmbd: fix indentation in process_logon_packet().
Günther Deschner [Tue, 7 Sep 2010 09:50:39 +0000 (11:50 +0200)]
s3-nmbd: fix indentation in process_logon_packet().

purely cosmetic, no code change.

Guenther

13 years agos3-nmbd: remove trailing whitespace in nmbd_processlogon.c
Günther Deschner [Wed, 8 Sep 2010 17:01:10 +0000 (19:01 +0200)]
s3-nmbd: remove trailing whitespace in nmbd_processlogon.c

Guenther

13 years agos3-spoolss: Move spoolss winreg to new dcerpc client funtions.
Andreas Schneider [Wed, 1 Sep 2010 16:00:44 +0000 (18:00 +0200)]
s3-spoolss: Move spoolss winreg to new dcerpc client funtions.