1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

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)
This commit is contained in:
Stefan Metzmacher 2005-08-11 13:12:45 +00:00 committed by Gerald (Jerry) Carter
parent 32e76af21a
commit 3be75a4c6d
13 changed files with 24 additions and 53 deletions

View File

@ -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

View File

@ -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",

View File

@ -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)) {

View File

@ -21,7 +21,7 @@
*/
#include "includes.h"
#include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_security.h"
/*

View File

@ -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.

View File

@ -21,7 +21,7 @@
*/
#include "includes.h"
#include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_security.h"
static const struct {

View File

@ -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 */

View File

@ -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)

View File

@ -22,7 +22,7 @@
*/
#include "includes.h"
#include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_security.h"
/*
return a blank security token

View File

@ -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;
}

View File

@ -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 {

View File

@ -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

View File

@ -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