Changeset 132 for trunk/include


Ignore:
Timestamp:
01/11/09 16:44:33 (15 years ago)
Author:
tim
Message:

separated ACL parsing code from smb_deps into new winsec library

Location:
trunk/include
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/regfi.h

    r131 r132  
    66 * Windows NT registry I/O library
    77 *
    8  * Copyright (C) 2005-2008 Timothy D. Morgan
     8 * Copyright (C) 2005-2009 Timothy D. Morgan
    99 * Copyright (C) 2005 Gerald (Jerry) Carter
    1010 *
     
    4747
    4848#include "smb_deps.h"
     49#include "winsec.h"
    4950#include "void_stack.h"
    5051#include "range_list.h"
  • trunk/include/smb_deps.h

    r111 r132  
    44 *   http://websvn.samba.org/cgi-bin/viewcvs.cgi/trunk/source/
    55 *
    6  * Copyright (C) 2005 Timothy D. Morgan
     6 * Copyright (C) 2005,2009 Timothy D. Morgan
    77 * Copyright (C) 1992-2005 Samba development team
    88 *               (see individual files under Subversion for details.)
     
    2323 * $Id$
    2424 */
     25
     26#ifndef _SMB_DEPS_H
     27#define _SMB_DEPS_H
    2528
    2629#include <stdlib.h>
     
    7376
    7477/* From smb.h */
    75 
    76 #define MAXSUBAUTHS 15
    77 
    78 typedef struct sid_info
    79 {
    80   uint8  sid_rev_num;             /**< SID revision number */
    81   uint8  num_auths;               /**< Number of sub-authorities */
    82   uint8  id_auth[6];              /**< Identifier Authority */
    83   /*
    84    *  Pointer to sub-authorities.
    85    *
    86    * @note The values in these uint32's are in *native* byteorder, not
    87    * neccessarily little-endian...... JRA.
    88    */
    89   uint32 sub_auths[MAXSUBAUTHS];
    90 } DOM_SID;
    9178
    9279typedef struct nttime_info
     
    184171
    185172
    186 /* From rpc_secdesc.h */
    187 
    188 typedef struct security_info_info
    189 {
    190         uint32 mask;
    191 
    192 } SEC_ACCESS;
    193 
    194 typedef struct security_ace_info
    195 {
    196         uint8 type;  /* xxxx_xxxx_ACE_TYPE - e.g allowed / denied etc */
    197         uint8 flags; /* xxxx_INHERIT_xxxx - e.g OBJECT_INHERIT_ACE */
    198         uint16 size;
    199 
    200         SEC_ACCESS info;
    201 
    202         /* this stuff may be present when type is XXXX_TYPE_XXXX_OBJECT */
    203         uint32  obj_flags; /* xxxx_ACE_OBJECT_xxxx e.g present/inherited present etc */
    204         struct uuid obj_guid;  /* object GUID */
    205         struct uuid inh_guid;  /* inherited object GUID */             
    206         /* eof object stuff */
    207 
    208         DOM_SID trustee;
    209 
    210 } SEC_ACE;
    211 
    212 typedef struct security_acl_info
    213 {
    214         uint16 revision; /* 0x0003 */
    215         uint16 size; /* size in bytes of the entire ACL structure */
    216         uint32 num_aces; /* number of Access Control Entries */
    217 
    218         SEC_ACE *ace;
    219 
    220 } SEC_ACL;
    221 
    222 typedef struct security_descriptor_info
    223 {
    224         uint16 revision; /* 0x0001 */
    225         uint16 type;     /* SEC_DESC_xxxx flags */
    226 
    227         uint32 off_owner_sid; /* offset to owner sid */
    228         uint32 off_grp_sid  ; /* offset to group sid */
    229         uint32 off_sacl     ; /* offset to system list of permissions */
    230         uint32 off_dacl     ; /* offset to list of permissions */
    231 
    232         SEC_ACL *dacl; /* user ACL */
    233         SEC_ACL *sacl; /* system ACL */
    234         DOM_SID *owner_sid;
    235         DOM_SID *grp_sid;
    236 
    237 } SEC_DESC;
    238 
    239 /* End of stuff from rpc_secdesc.h */
    240 
    241 
    242173/* From pstring.h */
    243174
     
    247178/* End of stuff from pstring.h */
    248179
    249 
    250 /* From rpc_secdes.h */
    251 
    252 #define SEC_DESC_DACL_PRESENT           0x0004
    253 #define SEC_DESC_SACL_PRESENT           0x0010
    254 #define  SEC_DESC_HEADER_SIZE (2 * sizeof(uint16) + 4 * sizeof(uint32))
    255    /* thanks for Jim McDonough <jmcd@us.ibm.com> */
    256 #define SEC_ACE_OBJECT_PRESENT        0x00000001
    257 #define SEC_ACE_OBJECT_INHERITED_PRESENT 0x00000002
    258 
    259 #define SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT      0x5
    260 #define SEC_ACE_TYPE_ACCESS_DENIED_OBJECT       0x6
    261 #define SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT        0x7
    262 #define SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT        0x8
    263 
    264 /* End of stuff from rpc_secdes.h */
    265 
    266180/* From rpc_parse/parse_misc.c */
    267181
     
    269183                 prs_struct *ps, int depth);
    270184bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth);
    271 bool smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth);
    272185
    273186/* End of stuff from rpc_parse/parse_misc.c */
    274187
    275 /* From lib/util_sid.c */
    276 
    277 size_t sid_size(const DOM_SID *sid);
    278 int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2);
    279 int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2);
    280 bool sid_equal(const DOM_SID *sid1, const DOM_SID *sid2);
    281 
    282 /* End of stuff from lib/util_sid.c */
    283 
    284 /* From lib/secace.c */
    285 
    286 bool sec_ace_object(uint8 type);
    287 
    288 /* End of stuff from lib/secace.c */
    289 
    290 /* From rpc_parse/parse_sec.c */
    291 
    292 bool sec_io_access(const char *desc, SEC_ACCESS *t, prs_struct *ps, int depth);
    293 bool sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth);
    294 bool sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth);
    295 bool sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth);
    296 
    297 /* End of stuff from rpc_parse/parse_sec.c */
    298 
    299 /* From lib/secace.c */
    300 
    301 bool sec_ace_equal(SEC_ACE *s1, SEC_ACE *s2);
    302 
    303 /* End of stuff from lib/secace.c */
    304 
    305 /* From lib/secacl.c */
    306 
    307 bool sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2);
    308 
    309 /* End of stuff from lib/secacl.c */
    310 
    311 /* From lib/secdesc.c */
    312 
    313 bool sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2);
    314 
    315 /* End of stuff from lib/secdesc.c */
     188#endif /* _SMB_DEPS_H */
Note: See TracChangeset for help on using the changeset viewer.