summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-08-11 13:12:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:37 -0500
commit3be75a4c6d4b9d86f1b85c75fb2f41c6c0eeec94 (patch)
treeb9d5ef9d55e280560296622720eea49d436e97cd /source4
parent32e76af21a3b983e1cf73ae3e488251ba9a0f97f (diff)
downloadsamba-3be75a4c6d4b9d86f1b85c75fb2f41c6c0eeec94.tar.gz
samba-3be75a4c6d4b9d86f1b85c75fb2f41c6c0eeec94.tar.bz2
samba-3be75a4c6d4b9d86f1b85c75fb2f41c6c0eeec94.zip
r9240: - move struct security_token to the idl file, with this we can
the ndr_pull/push/print functions for it in the ntacl-lsm module - fix compiler warnings in the ldap_encode_ndr_* code metze (This used to be commit 83d65d0d7ed9c240ad44aa2c881c1f07212bfda4)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/auth_util.c2
-rw-r--r--source4/dsdb/samdb/samdb_privilege.c6
-rw-r--r--source4/libcli/ldap/ldap_ndr.c10
-rw-r--r--source4/libcli/security/access_check.c2
-rw-r--r--source4/libcli/security/dom_sid.c2
-rw-r--r--source4/libcli/security/privilege.c2
-rw-r--r--source4/libcli/security/security.h36
-rw-r--r--source4/libcli/security/security_descriptor.c2
-rw-r--r--source4/libcli/security/security_token.c2
-rw-r--r--source4/librpc/idl/security.idl8
-rw-r--r--source4/ntvfs/unixuid/vfs_unixuid.c2
-rw-r--r--source4/utils/getntacl.c1
-rw-r--r--source4/utils/ntlm_auth.c2
13 files changed, 24 insertions, 53 deletions
diff --git a/source4/auth/auth_util.c b/source4/auth/auth_util.c
index 433041348e..a56a32d934 100644
--- a/source4/auth/auth_util.c
+++ b/source4/auth/auth_util.c
@@ -25,7 +25,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
-#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_security.h"
#include "auth/auth.h"
/* this default function can be used by mostly all backends
diff --git a/source4/dsdb/samdb/samdb_privilege.c b/source4/dsdb/samdb/samdb_privilege.c
index 7560d21db5..059d612225 100644
--- a/source4/dsdb/samdb/samdb_privilege.c
+++ b/source4/dsdb/samdb/samdb_privilege.c
@@ -21,7 +21,7 @@
*/
#include "includes.h"
-#include "libcli/security/security.h"
+#include "librpc/gen_ndr/security.h"
#include "lib/ldb/include/ldb.h"
/*
@@ -35,7 +35,7 @@ static NTSTATUS samdb_privilege_setup_sid(void *samctx, TALLOC_CTX *mem_ctx,
struct ldb_message **res = NULL;
struct ldb_message_element *el;
int ret, i;
- const char *sidstr;
+ char *sidstr;
*mask = 0;
@@ -55,7 +55,7 @@ static NTSTATUS samdb_privilege_setup_sid(void *samctx, TALLOC_CTX *mem_ctx,
}
for (i=0;i<el->num_values;i++) {
- const char *priv_str = el->values[i].data;
+ const char *priv_str = (const char *)el->values[i].data;
int privilege = sec_privilege_id(priv_str);
if (privilege == -1) {
DEBUG(1,("Unknown privilege '%s' in samdb\n",
diff --git a/source4/libcli/ldap/ldap_ndr.c b/source4/libcli/ldap/ldap_ndr.c
index bc19e49535..0cccdbe971 100644
--- a/source4/libcli/ldap/ldap_ndr.c
+++ b/source4/libcli/ldap/ldap_ndr.c
@@ -29,7 +29,7 @@
/*
encode a NDR uint32 as a ldap filter element
*/
-const char *ldap_encode_ndr_uint32(TALLOC_CTX *mem_ctx, uint32_t value)
+char *ldap_encode_ndr_uint32(TALLOC_CTX *mem_ctx, uint32_t value)
{
uint8_t buf[4];
struct ldb_val val;
@@ -42,11 +42,11 @@ const char *ldap_encode_ndr_uint32(TALLOC_CTX *mem_ctx, uint32_t value)
/*
encode a NDR dom_sid as a ldap filter element
*/
-const char *ldap_encode_ndr_dom_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
+char *ldap_encode_ndr_dom_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
{
DATA_BLOB blob;
NTSTATUS status;
- const char *ret;
+ char *ret;
status = ndr_push_struct_blob(&blob, mem_ctx, sid,
(ndr_push_flags_fn_t)ndr_push_dom_sid);
if (!NT_STATUS_IS_OK(status)) {
@@ -61,11 +61,11 @@ const char *ldap_encode_ndr_dom_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *s
/*
encode a NDR GUID as a ldap filter element
*/
-const char *ldap_encode_ndr_GUID(TALLOC_CTX *mem_ctx, struct GUID *guid)
+char *ldap_encode_ndr_GUID(TALLOC_CTX *mem_ctx, struct GUID *guid)
{
DATA_BLOB blob;
NTSTATUS status;
- const char *ret;
+ char *ret;
status = ndr_push_struct_blob(&blob, mem_ctx, guid,
(ndr_push_flags_fn_t)ndr_push_GUID);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/libcli/security/access_check.c b/source4/libcli/security/access_check.c
index 632b9bdf32..c10751abce 100644
--- a/source4/libcli/security/access_check.c
+++ b/source4/libcli/security/access_check.c
@@ -21,7 +21,7 @@
*/
#include "includes.h"
-#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_security.h"
/*
diff --git a/source4/libcli/security/dom_sid.c b/source4/libcli/security/dom_sid.c
index 80e481c3e4..f457900efc 100644
--- a/source4/libcli/security/dom_sid.c
+++ b/source4/libcli/security/dom_sid.c
@@ -22,7 +22,7 @@
*/
#include "includes.h"
-#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_security.h"
/*****************************************************************
Compare the auth portion of two sids.
diff --git a/source4/libcli/security/privilege.c b/source4/libcli/security/privilege.c
index ed98e9ce32..aa01dc2c65 100644
--- a/source4/libcli/security/privilege.c
+++ b/source4/libcli/security/privilege.c
@@ -21,7 +21,7 @@
*/
#include "includes.h"
-#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_security.h"
static const struct {
diff --git a/source4/libcli/security/security.h b/source4/libcli/security/security.h
deleted file mode 100644
index b11d10f6f6..0000000000
--- a/source4/libcli/security/security.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- security utility functions
-
- Copyright (C) Andrew Tridgell 2004
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#ifndef _SAMBA_SECURITY_H
-#define _SAMBA_SECURITY_H
-
-#include "librpc/gen_ndr/ndr_security.h"
-
-struct security_token {
- struct dom_sid *user_sid;
- struct dom_sid *group_sid;
- uint32_t num_sids;
- struct dom_sid **sids;
- uint64_t privilege_mask;
-};
-
-#endif /* _SAMBA_SECURITY_H */
diff --git a/source4/libcli/security/security_descriptor.c b/source4/libcli/security/security_descriptor.c
index d1978fd795..703abf7970 100644
--- a/source4/libcli/security/security_descriptor.c
+++ b/source4/libcli/security/security_descriptor.c
@@ -21,7 +21,7 @@
*/
#include "includes.h"
-#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_security.h"
/*
return a blank security descriptor (no owners, dacl or sacl)
diff --git a/source4/libcli/security/security_token.c b/source4/libcli/security/security_token.c
index 663c4f28bc..ea1fae0c33 100644
--- a/source4/libcli/security/security_token.c
+++ b/source4/libcli/security/security_token.c
@@ -22,7 +22,7 @@
*/
#include "includes.h"
-#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_security.h"
/*
return a blank security token
diff --git a/source4/librpc/idl/security.idl b/source4/librpc/idl/security.idl
index c183f88724..dd502b178f 100644
--- a/source4/librpc/idl/security.idl
+++ b/source4/librpc/idl/security.idl
@@ -317,4 +317,12 @@ interface security
[range(0,0x40000),value(ndr_size_security_descriptor(sd))] uint32 sd_size;
[subcontext(4)] security_descriptor *sd;
} sec_desc_buf;
+
+ typedef [public] struct {
+ dom_sid *user_sid;
+ dom_sid *group_sid;
+ uint32 num_sids;
+ [size_is(num_sids)] dom_sid *sids[*];
+ udlong privilege_mask;
+ } security_token;
}
diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c
index d724e7ceb2..41b1d7965d 100644
--- a/source4/ntvfs/unixuid/vfs_unixuid.c
+++ b/source4/ntvfs/unixuid/vfs_unixuid.c
@@ -25,7 +25,7 @@
#include "system/filesys.h"
#include "system/passwd.h"
#include "auth/auth.h"
-#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_security.h"
#include "smb_server/smb_server.h"
struct unixuid_private {
diff --git a/source4/utils/getntacl.c b/source4/utils/getntacl.c
index c3b704d85e..942183de3e 100644
--- a/source4/utils/getntacl.c
+++ b/source4/utils/getntacl.c
@@ -22,7 +22,6 @@
#include "includes.h"
#include "system/filesys.h"
-#include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_xattr.h"
#if HAVE_XATTR_SUPPORT
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index 1431f7f415..61d6ff3b85 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -28,7 +28,7 @@
#include "system/passwd.h"
#include "lib/cmdline/popt_common.h"
#include "auth/auth.h"
-#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_security.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND