Changeset 133 for trunk/include


Ignore:
Timestamp:
01/12/09 12:07:58 (15 years ago)
Author:
tim
Message:

minor changes to winsec library

fixed major bug with data_in_offset values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/winsec.h

    r132 r133  
    11/*
    2  * This file contains miscellaneous pieces of code which regfio.c
    3  * depends upon, from the Samba Subversion tree. See:
     2 * This file contains refactored Samba code used to interpret Windows
     3 * Security Descriptors. See:
    44 *   http://websvn.samba.org/cgi-bin/viewcvs.cgi/trunk/source/
    55 *
    66 * Copyright (C) 2005,2009 Timothy D. Morgan
    77 * Copyright (C) 1992-2005 Samba development team
    8  *               (see individual files under Subversion for details.)
    9  *
     8 *
    109 * This program is free software; you can redistribute it and/or modify
    1110 * it under the terms of the GNU General Public License as published by
     
    2120 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2221 *
    23  * $Id $
     22 * $Id$
    2423 */
    2524
     
    3736
    3837
    39 /* From smb.h */
     38#define MAXSUBAUTHS 15
    4039
    41 #define MAXSUBAUTHS 15
     40#define SEC_DESC_HEADER_SIZE     (2 * sizeof(uint16) + 4 * sizeof(uint32))
     41                                 /*thanks for Jim McDonough <jmcd@us.ibm.com>*/
     42#define SEC_DESC_DACL_PRESENT    0x0004
     43#define SEC_DESC_SACL_PRESENT    0x0010
     44
     45#define SEC_ACE_OBJECT_PRESENT              0x00000001
     46#define SEC_ACE_OBJECT_INHERITED_PRESENT    0x00000002
     47#define SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT  0x5
     48#define SEC_ACE_TYPE_ACCESS_DENIED_OBJECT   0x6
     49#define SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT    0x7
     50#define SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT    0x8
     51
    4252
    4353typedef struct sid_info
     
    5565} DOM_SID;
    5666
    57 /* End of stuff from smb.h */
    58 
    59 
    60 /* From rpc_secdesc.h */
    6167
    6268typedef struct security_info_info
     
    111117} SEC_DESC;
    112118
    113 /* End of stuff from rpc_secdesc.h */
    114119
    115120
    116 
    117 /* From rpc_secdes.h */
    118 
    119 #define SEC_DESC_DACL_PRESENT           0x0004
    120 #define SEC_DESC_SACL_PRESENT           0x0010
    121 #define  SEC_DESC_HEADER_SIZE (2 * sizeof(uint16) + 4 * sizeof(uint32))
    122    /* thanks for Jim McDonough <jmcd@us.ibm.com> */
    123 #define SEC_ACE_OBJECT_PRESENT        0x00000001
    124 #define SEC_ACE_OBJECT_INHERITED_PRESENT 0x00000002
    125 
    126 #define SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT      0x5
    127 #define SEC_ACE_TYPE_ACCESS_DENIED_OBJECT       0x6
    128 #define SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT        0x7
    129 #define SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT        0x8
    130 
    131 /* End of stuff from rpc_secdes.h */
    132 
    133 /* From rpc_parse/parse_misc.c */
    134 
    135121bool smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth);
    136 
    137 /* End of stuff from rpc_parse/parse_misc.c */
    138 
    139 /* From lib/util_sid.c */
    140 
    141 size_t sid_size(const DOM_SID *sid);
    142 int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2);
    143 int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2);
    144 bool sid_equal(const DOM_SID *sid1, const DOM_SID *sid2);
    145 
    146 /* End of stuff from lib/util_sid.c */
    147 
    148 /* From lib/secace.c */
    149 
    150 bool sec_ace_object(uint8 type);
    151 
    152 /* End of stuff from lib/secace.c */
    153 
    154 /* From rpc_parse/parse_sec.c */
    155 
    156122bool sec_io_access(const char *desc, SEC_ACCESS *t, prs_struct *ps, int depth);
    157123bool sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth);
     
    159125bool sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth);
    160126
    161 /* End of stuff from rpc_parse/parse_sec.c */
    162 
    163 /* From lib/secace.c */
    164 
     127size_t sid_size(const DOM_SID *sid);
     128int sid_compare_auth(const DOM_SID *sid1, const DOM_SID *sid2);
     129int sid_compare(const DOM_SID *sid1, const DOM_SID *sid2);
    165130bool sec_ace_equal(SEC_ACE *s1, SEC_ACE *s2);
    166 
    167 /* End of stuff from lib/secace.c */
    168 
    169 /* From lib/secacl.c */
    170 
    171131bool sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2);
    172 
    173 /* End of stuff from lib/secacl.c */
    174 
    175 /* From lib/secdesc.c */
    176 
    177132bool sec_desc_equal(SEC_DESC *s1, SEC_DESC *s2);
    178 
    179 /* End of stuff from lib/secdesc.c */
     133bool sid_equal(const DOM_SID *sid1, const DOM_SID *sid2);
     134bool sec_ace_object(uint8 type);
Note: See TracChangeset for help on using the changeset viewer.