Example #1
0
File: entry.go Project: tomdee/rkt
// 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
}
Example #2
0
File: entry.go Project: tomdee/rkt
// 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
}