Exemple #1
0
// SetQualifier sets the Uid or Gid the entry applies to.
func (entry *Entry) SetQualifier(id int) error {
	rv, _ := C.acl_set_qualifier(entry.e, unsafe.Pointer(&id))
	if rv < 0 {
		return fmt.Errorf("unable to set qualifier")
	}
	return nil
}
Exemple #2
0
// GetQualifier returns the Uid or Gid the entry applies to.
func (entry *Entry) GetQualifier() (int, error) {
	var id int
	rv, _ := C.acl_set_qualifier(entry.e, unsafe.Pointer(&id))
	if rv < 0 {
		return -1, fmt.Errorf("unable to get qualifier")
	}
	return id, nil
}