"Error opening configuration directory (%s): %s" % \
(AFSDIR_CLIENT_ETC_DIRPATH, strerror(errno)))
code = afsconf_GetCellInfo(cdir, c_cell, "afsprot", &info)
"Error opening configuration directory (%s): %s" % \
(AFSDIR_CLIENT_ETC_DIRPATH, strerror(errno)))
code = afsconf_GetCellInfo(cdir, c_cell, "afsprot", &info)
"""
Given an identifier, convert it to a PTS ID by looking up the
name if it's a string, or otherwise just converting it to an
integer.
"""
if isinstance(ident, (str, unicode)):
"""
Given an identifier, convert it to a PTS ID by looking up the
name if it's a string, or otherwise just converting it to an
integer.
"""
if isinstance(ident, (str, unicode)):
"""
Create a new user in the protection database. If an ID is
provided, that one will be used.
"""
Create a new user in the protection database. If an ID is
provided, that one will be used.
else:
code = ubik_PR_NewEntry(self.client, 0, name, 0, 0, &cid)
else:
code = ubik_PR_NewEntry(self.client, 0, name, 0, 0, &cid)
- def CreateGroup(self, name, owner, id=None):
+ def _CreateGroup(self, name, owner, id=None):
"""
Create a new group in the protection database. If an ID is
provided, that one will be used.
"""
Create a new group in the protection database. If an ID is
provided, that one will be used.
else:
code = ubik_PR_NewEntry(self.client, 0, name, PRGRP, oid, &cid)
else:
code = ubik_PR_NewEntry(self.client, 0, name, PRGRP, oid, &cid)
code = ubik_PR_AddToGroup(self.client, 0, uid, gid)
code = ubik_PR_AddToGroup(self.client, 0, uid, gid)
code = ubik_PR_RemoveFromGroup(self.client, 0, uid, gid)
code = ubik_PR_RemoveFromGroup(self.client, 0, uid, gid)
code = ubik_PR_ListEntry(self.client, 0, id, ¢ry)
code = ubik_PR_ListEntry(self.client, 0, id, ¢ry)
- def ChangeEntry(self, id, newname=None, newid=None, newoid=None):
+ def _ChangeEntry(self, ident, newname=None, newid=None, newoid=None):
c_newoid = newoid
code = ubik_PR_ChangeEntry(self.client, 0, id, c_newname, c_newoid, c_newid)
c_newoid = newoid
code = ubik_PR_ChangeEntry(self.client, 0, id, c_newname, c_newoid, c_newid)
code = ubik_PR_IsAMemberOf(self.client, 0, uid, gid, &flag)
code = ubik_PR_IsAMemberOf(self.client, 0, uid, gid, &flag)
cdef afs_int32 code, uid, gid
code = ubik_PR_ListMax(self.client, 0, &uid, &gid)
cdef afs_int32 code, uid, gid
code = ubik_PR_ListMax(self.client, 0, &uid, &gid)
cdef afs_int32 code
code = ubik_PR_SetMax(self.client, 0, id, 0)
cdef afs_int32 code
code = ubik_PR_SetMax(self.client, 0, id, 0)
cdef afs_int32 code
code = ubik_PR_SetMax(self.client, 0, id, PRGRP)
cdef afs_int32 code
code = ubik_PR_SetMax(self.client, 0, id, PRGRP)
_ptentry_from_c(e, <prcheckentry *>¢ries.prentries_val[i])
entries.append(e)
free(centries.prentries_val)
_ptentry_from_c(e, <prcheckentry *>¢ries.prentries_val[i])
entries.append(e)
free(centries.prentries_val)
- def SetFields(self, id, access=None, groups=None, users=None):
+ def _SetFields(self, ident, access=None, groups=None, users=None):
cdef afs_int32 code
cdef afs_int32 mask = 0, flags = 0, nusers = 0, ngroups = 0
cdef afs_int32 code
cdef afs_int32 mask = 0, flags = 0, nusers = 0, ngroups = 0
mask |= PR_SF_NGROUPS
code = ubik_PR_SetFieldsEntry(self.client, 0, id, mask, flags, ngroups, nusers, 0, 0)
mask |= PR_SF_NGROUPS
code = ubik_PR_SetFieldsEntry(self.client, 0, id, mask, flags, ngroups, nusers, 0, 0)