1 # This file was automatically generated by SWIG (http://www.swig.org).
4 # Don't modify this file, modify the SWIG interface instead.
7 Security-related classes.
12 new_instancemethod
= new
.instancemethod
14 _swig_property
= property
16 pass # Python < 2.2 doesn't have 'property'.
17 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
18 if (name
== "thisown"): return self
.this
.own(value
)
20 if type(value
).__name
__ == 'PySwigObject':
21 self
.__dict
__[name
] = value
23 method
= class_type
.__swig
_setmethods
__.get(name
,None)
24 if method
: return method(self
,value
)
25 if (not static
) or hasattr(self
,name
):
26 self
.__dict
__[name
] = value
28 raise AttributeError("You cannot add attributes to %s" % self
)
30 def _swig_setattr(self
,class_type
,name
,value
):
31 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
33 def _swig_getattr(self
,class_type
,name
):
34 if (name
== "thisown"): return self
.this
.own()
35 method
= class_type
.__swig
_getmethods
__.get(name
,None)
36 if method
: return method(self
)
37 raise AttributeError,name
40 try: strthis
= "proxy of " + self
.this
.__repr
__()
42 return "<%s.%s; %s >" % (self
.__class
__.__module
__, self
.__class
__.__name
__, strthis
,)
46 _object
= types
.ObjectType
48 except AttributeError:
54 def _swig_setattr_nondynamic_method(set):
55 def set_attr(self
,name
,value
):
56 if (name
== "thisown"): return self
.this
.own(value
)
57 if hasattr(self
,name
) or (name
== "this"):
60 raise AttributeError("You cannot add attributes to %s" % self
)
64 SEC_PRIV_SECURITY
= _security
.SEC_PRIV_SECURITY
65 SEC_PRIV_BACKUP
= _security
.SEC_PRIV_BACKUP
66 SEC_PRIV_RESTORE
= _security
.SEC_PRIV_RESTORE
67 SEC_PRIV_SYSTEMTIME
= _security
.SEC_PRIV_SYSTEMTIME
68 SEC_PRIV_SHUTDOWN
= _security
.SEC_PRIV_SHUTDOWN
69 SEC_PRIV_REMOTE_SHUTDOWN
= _security
.SEC_PRIV_REMOTE_SHUTDOWN
70 SEC_PRIV_TAKE_OWNERSHIP
= _security
.SEC_PRIV_TAKE_OWNERSHIP
71 SEC_PRIV_DEBUG
= _security
.SEC_PRIV_DEBUG
72 SEC_PRIV_SYSTEM_ENVIRONMENT
= _security
.SEC_PRIV_SYSTEM_ENVIRONMENT
73 SEC_PRIV_SYSTEM_PROFILE
= _security
.SEC_PRIV_SYSTEM_PROFILE
74 SEC_PRIV_PROFILE_SINGLE_PROCESS
= _security
.SEC_PRIV_PROFILE_SINGLE_PROCESS
75 SEC_PRIV_INCREASE_BASE_PRIORITY
= _security
.SEC_PRIV_INCREASE_BASE_PRIORITY
76 SEC_PRIV_LOAD_DRIVER
= _security
.SEC_PRIV_LOAD_DRIVER
77 SEC_PRIV_CREATE_PAGEFILE
= _security
.SEC_PRIV_CREATE_PAGEFILE
78 SEC_PRIV_INCREASE_QUOTA
= _security
.SEC_PRIV_INCREASE_QUOTA
79 SEC_PRIV_CHANGE_NOTIFY
= _security
.SEC_PRIV_CHANGE_NOTIFY
80 SEC_PRIV_UNDOCK
= _security
.SEC_PRIV_UNDOCK
81 SEC_PRIV_MANAGE_VOLUME
= _security
.SEC_PRIV_MANAGE_VOLUME
82 SEC_PRIV_IMPERSONATE
= _security
.SEC_PRIV_IMPERSONATE
83 SEC_PRIV_CREATE_GLOBAL
= _security
.SEC_PRIV_CREATE_GLOBAL
84 SEC_PRIV_ENABLE_DELEGATION
= _security
.SEC_PRIV_ENABLE_DELEGATION
85 SEC_PRIV_INTERACTIVE_LOGON
= _security
.SEC_PRIV_INTERACTIVE_LOGON
86 SEC_PRIV_NETWORK_LOGON
= _security
.SEC_PRIV_NETWORK_LOGON
87 SEC_PRIV_REMOTE_INTERACTIVE_LOGON
= _security
.SEC_PRIV_REMOTE_INTERACTIVE_LOGON
88 class SecurityToken(object):
89 thisown
= _swig_property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
91 def __init__(self
, *args
, **kwargs
):
92 _security
.SecurityToken_swiginit(self
,_security
.new_SecurityToken(*args
, **kwargs
))
93 def is_sid(*args
, **kwargs
):
96 Check whether this token is of the specified SID.
98 return _security
.SecurityToken_is_sid(*args
, **kwargs
)
100 def is_system(*args
, **kwargs
):
102 S.is_system() -> bool
103 Check whether this is a system token.
105 return _security
.SecurityToken_is_system(*args
, **kwargs
)
107 def is_anonymous(*args
, **kwargs
):
109 S.is_anonymus() -> bool
110 Check whether this is an anonymous token.
112 return _security
.SecurityToken_is_anonymous(*args
, **kwargs
)
114 __swig_destroy__
= _security
.delete_SecurityToken
115 SecurityToken
.is_sid
= new_instancemethod(_security
.SecurityToken_is_sid
,None,SecurityToken
)
116 SecurityToken
.is_system
= new_instancemethod(_security
.SecurityToken_is_system
,None,SecurityToken
)
117 SecurityToken
.is_anonymous
= new_instancemethod(_security
.SecurityToken_is_anonymous
,None,SecurityToken
)
118 SecurityToken
.has_sid
= new_instancemethod(_security
.SecurityToken_has_sid
,None,SecurityToken
)
119 SecurityToken
.has_builtin_administrators
= new_instancemethod(_security
.SecurityToken_has_builtin_administrators
,None,SecurityToken
)
120 SecurityToken
.has_nt_authenticated_users
= new_instancemethod(_security
.SecurityToken_has_nt_authenticated_users
,None,SecurityToken
)
121 SecurityToken
.has_privilege
= new_instancemethod(_security
.SecurityToken_has_privilege
,None,SecurityToken
)
122 SecurityToken
.set_privilege
= new_instancemethod(_security
.SecurityToken_set_privilege
,None,SecurityToken
)
123 SecurityToken_swigregister
= _security
.SecurityToken_swigregister
124 SecurityToken_swigregister(SecurityToken
)
126 class security_descriptor(object):
127 thisown
= _swig_property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
128 __repr__
= _swig_repr
129 def __init__(self
, *args
, **kwargs
):
130 _security
.security_descriptor_swiginit(self
,_security
.new_security_descriptor(*args
, **kwargs
))
131 def sacl_add(*args
, **kwargs
):
133 S.sacl_add(ace) -> None
134 Add a security ace to this security descriptor
136 return _security
.security_descriptor_sacl_add(*args
, **kwargs
)
138 __swig_destroy__
= _security
.delete_security_descriptor
139 security_descriptor
.sacl_add
= new_instancemethod(_security
.security_descriptor_sacl_add
,None,security_descriptor
)
140 security_descriptor
.dacl_add
= new_instancemethod(_security
.security_descriptor_dacl_add
,None,security_descriptor
)
141 security_descriptor
.dacl_del
= new_instancemethod(_security
.security_descriptor_dacl_del
,None,security_descriptor
)
142 security_descriptor
.sacl_del
= new_instancemethod(_security
.security_descriptor_sacl_del
,None,security_descriptor
)
143 security_descriptor
.__eq
__ = new_instancemethod(_security
.security_descriptor___eq__
,None,security_descriptor
)
144 security_descriptor_swigregister
= _security
.security_descriptor_swigregister
145 security_descriptor_swigregister(security_descriptor
)
148 thisown
= _swig_property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
149 __repr__
= _swig_repr
150 sid_rev_num
= _swig_property(_security
.Sid_sid_rev_num_get
)
151 num_auths
= _swig_property(_security
.Sid_num_auths_get
)
152 id_auth
= _swig_property(_security
.Sid_id_auth_get
)
153 sub_auths
= _swig_property(_security
.Sid_sub_auths_get
)
154 def __init__(self
, *args
, **kwargs
):
155 _security
.Sid_swiginit(self
,_security
.new_Sid(*args
, **kwargs
))
157 return "Sid(%r)" % str(self
)
159 __swig_destroy__
= _security
.delete_Sid
160 Sid
.__str
__ = new_instancemethod(_security
.Sid___str__
,None,Sid
)
161 Sid
.__eq
__ = new_instancemethod(_security
.Sid___eq__
,None,Sid
)
162 Sid_swigregister
= _security
.Sid_swigregister
163 Sid_swigregister(Sid
)
166 def random_sid(*args
):
169 Generate a random SID
171 return _security
.random_sid(*args
)
172 privilege_name
= _security
.privilege_name
173 privilege_id
= _security
.privilege_id