From 99b288156f021db7bb771f3a5bf78def61d699f2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 1 Mar 2009 17:59:30 +0100 Subject: Move secace.c to top-level. --- source3/include/rpc_secdes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/rpc_secdes.h b/source3/include/rpc_secdes.h index 4bf0d9cb9d..37f7464a4a 100644 --- a/source3/include/rpc_secdes.h +++ b/source3/include/rpc_secdes.h @@ -69,7 +69,6 @@ /* SEC_ACE */ typedef struct security_ace SEC_ACE; -#define SEC_ACE_HEADER_SIZE (2 * sizeof(uint8) + sizeof(uint16) + sizeof(uint32)) #ifndef ACL_REVISION #define ACL_REVISION 0x3 -- cgit From 9bd0cf8d60b9bbaafa20f33bb1baf222620fb0b0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 1 Mar 2009 18:02:24 +0100 Subject: Keep using Samba3's charset.h for now. --- source3/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/includes.h b/source3/include/includes.h index 7f8c408265..523a11e255 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -594,7 +594,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx); #include "trans2.h" #include "../libcli/util/error.h" #include "ntioctl.h" -#include "../lib/util/charset/charset.h" +#include "charset.h" #include "dynconfig.h" #include "util_getent.h" #include "debugparse.h" -- cgit From d3c2de093a35d0168fead27787a3da44a39fbea9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 1 Mar 2009 18:05:22 +0100 Subject: Also re-add removed codepoint_t; I'm clearly not having my day today. --- source3/include/smb.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source3/include') diff --git a/source3/include/smb.h b/source3/include/smb.h index 189e370496..f02088731d 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -167,6 +167,10 @@ typedef uint16 smb_ucs2_t; #define COPY_UCS2_CHAR(dest,src) (((unsigned char *)(dest))[0] = ((unsigned char *)(src))[0],\ ((unsigned char *)(dest))[1] = ((unsigned char *)(src))[1], (dest)) +/* Large data type for manipulating uint32 unicode codepoints */ +typedef uint32 codepoint_t; +#define INVALID_CODEPOINT ((codepoint_t)-1) + /* pipe string names */ #define PIPE_LANMAN "\\PIPE\\LANMAN" @@ -1827,6 +1831,18 @@ struct unix_error_map { #define SAFE_NETBIOS_CHARS ". -_" +/* generic iconv conversion structure */ +typedef struct _smb_iconv_t { + size_t (*direct)(void *cd, const char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft); + size_t (*pull)(void *cd, const char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft); + size_t (*push)(void *cd, const char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft); + void *cd_direct, *cd_pull, *cd_push; + char *from_name, *to_name; +} *smb_iconv_t; + /* The maximum length of a trust account password. Used when we randomly create it, 15 char passwords exceed NT4's max password length */ -- cgit From da6721e3231fb93b934440c2d92abab834289c82 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 1 Mar 2009 18:15:36 +0100 Subject: Move secacl to top-level. --- source3/include/rpc_secdes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/rpc_secdes.h b/source3/include/rpc_secdes.h index 37f7464a4a..c74d621f35 100644 --- a/source3/include/rpc_secdes.h +++ b/source3/include/rpc_secdes.h @@ -77,7 +77,6 @@ typedef struct security_ace SEC_ACE; #ifndef _SEC_ACL /* SEC_ACL */ typedef struct security_acl SEC_ACL; -#define SEC_ACL_HEADER_SIZE (2 * sizeof(uint16) + sizeof(uint32)) #define _SEC_ACL #endif -- cgit From 8568b4fa9ff8f6f1a24547ec2ed5e2942b213d9e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 1 Mar 2009 20:06:55 +0100 Subject: Add header files for secace and secacl. --- source3/include/includes.h | 2 ++ source3/include/proto.h | 23 +---------------------- 2 files changed, 3 insertions(+), 22 deletions(-) (limited to 'source3/include') diff --git a/source3/include/includes.h b/source3/include/includes.h index 523a11e255..63c77ec182 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -703,6 +703,8 @@ enum flush_reason_enum { #ifndef NO_PROTO_H #include "proto.h" #endif +#include "libcli/security/secace.h" +#include "libcli/security/secacl.h" #if defined(HAVE_POSIX_ACLS) #include "modules/vfs_posixacl.h" diff --git a/source3/include/proto.h b/source3/include/proto.h index eeb6f1928d..60f8ace74d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -650,28 +650,6 @@ ssize_t sys_recvfile(int fromfd, size_t count); ssize_t drain_socket(int sockfd, size_t count); -/* The following definitions come from lib/secace.c */ - -bool sec_ace_object(uint8 type); -void sec_ace_copy(SEC_ACE *ace_dest, SEC_ACE *ace_src); -void init_sec_ace(SEC_ACE *t, const DOM_SID *sid, enum security_ace_type type, - uint32 mask, uint8 flag); -NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, unsigned *num, DOM_SID *sid, uint32 mask); -NTSTATUS sec_ace_mod_sid(SEC_ACE *ace, size_t num, DOM_SID *sid, uint32 mask); -NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, uint32 *num, DOM_SID *sid); -bool sec_ace_equal(SEC_ACE *s1, SEC_ACE *s2); -int nt_ace_inherit_comp( SEC_ACE *a1, SEC_ACE *a2); -int nt_ace_canon_comp( SEC_ACE *a1, SEC_ACE *a2); -void dacl_sort_into_canonical_order(SEC_ACE *srclist, unsigned int num_aces); -bool token_sid_in_ace(const NT_USER_TOKEN *token, const SEC_ACE *ace); - -/* The following definitions come from lib/secacl.c */ - -SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, enum security_acl_revision revision, - int num_aces, SEC_ACE *ace_list); -SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src); -bool sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2); - /* The following definitions come from lib/secdesc.c */ bool sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2); @@ -1252,6 +1230,7 @@ NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx, const struct nt_user_token *token_1, const struct nt_user_token *token_2, struct nt_user_token **token_out); +bool token_sid_in_ace(const NT_USER_TOKEN *token, const SEC_ACE *ace); /* The following definitions come from lib/util_pw.c */ -- cgit