Merge branch 'master' of git://git.samba.org/samba into convenience
authorJelmer Vernooij <jelmer@samba.org>
Sun, 1 Mar 2009 21:25:57 +0000 (22:25 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 1 Mar 2009 21:25:57 +0000 (22:25 +0100)
1  2 
source3/Makefile.in
source3/include/proto.h
source3/include/smb.h

diff --combined source3/Makefile.in
index 8723b4f63f3a20cd7b2bb669c6b83b8a88d34fe3,f1272559b74529c343b3250286aff9621df52677..abf6cfb5f7c76372be79e04886e6fa6b73045506
@@@ -366,11 -366,12 +366,12 @@@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OB
          lib/substitute.o lib/dbwrap_util.o \
          lib/ms_fnmatch.o lib/select.o lib/errmap_unix.o \
          lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \
 -        lib/iconv.o lib/pam_errors.o intl/lang_tdb.o lib/conn_tdb.o \
 -        lib/adt_tree.o lib/gencache.o \
 +        ../lib/util/charset/iconv.o lib/pam_errors.o intl/lang_tdb.o \
 +        lib/conn_tdb.o lib/adt_tree.o lib/gencache.o \
          lib/module.o lib/events.o @LIBTEVENT_OBJ0@ \
          lib/ldap_escape.o @CHARSET_STATIC@ \
-         lib/secdesc.o lib/util_seaccess.o lib/secace.o lib/secacl.o \
+         lib/secdesc.o lib/util_seaccess.o ../libcli/security/secace.o \
+         ../libcli/security/secacl.o \
          libads/krb5_errs.o lib/system_smbd.o lib/audit.o $(LIBNDR_OBJ) \
          lib/file_id.o lib/idmap_cache.o \
          ../libcli/security/dom_sid.o
diff --combined source3/include/proto.h
index 0e6446be84aa5fab1070939052d3dc961d6600d5,60f8ace74de38a882bd467c1ad710a3ea41a36df..e1eab8dc162ac8ba12b614ea1a093e1619b852b2
@@@ -336,7 -336,6 +336,7 @@@ int bitmap_find(struct bitmap *bm, unsi
  
  /* The following definitions come from lib/charcnv.c  */
  
 +NTSTATUS smb_register_charset(struct charset_functions *funcs);
  char lp_failed_convert_char(void);
  void lazy_initialize_conv(void);
  void gfree_charcnv(void);
@@@ -348,7 -347,7 +348,7 @@@ bool convert_string_allocate(TALLOC_CT
                             void const *src, size_t srclen, void *dst,
                             size_t *converted_size, bool allow_bad_conv);
  bool convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to,
 -                         void const *src, size_t srclen, void *dst,
 +                         void const *src, size_t srclen, void **dst,
                           size_t *converted_size, bool allow_bad_conv);
  size_t unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen);
  char *strdup_upper(const char *s);
@@@ -651,28 -650,6 +651,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);
@@@ -1253,6 -1230,7 +1231,7 @@@ NTSTATUS merge_nt_token(TALLOC_CTX *mem
                        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  */
  
diff --combined source3/include/smb.h
index 59c3c32346de3ff5f71a7c101b7b1dce3274846d,f02088731d75b08e7352bda9c9a21e87220f8ea8..5c2bd12df0c33ebac7ed031317fd94d1c5cfb01b
@@@ -149,6 -149,8 +149,6 @@@ typedef union unid_t 
   * smb_ucs2_t is *always* in little endian format.
   */
  
 -typedef uint16 smb_ucs2_t;
 -
  #ifdef WORDS_BIGENDIAN
  #define UCS2_SHIFT 8
  #else
  #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"
  
@@@ -1825,6 -1831,18 +1829,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 */