Skip Navigation Links | |
Exit Print View | |
![]() |
man pages section 3: Extended Library Functions, Volume 4 Oracle Solaris 11 Express 11/10 |
Extended Library Functions, Volume 4
gl_customize_completion(3TECLA)
scf_count_ranges_destroy(3SCF)
scf_entry_destroy_children(3SCF)
scf_instance_get_pg_composed(3SCF)
scf_instance_get_snapshot(3SCF)
scf_iter_instance_pgs_composed(3SCF)
scf_iter_instance_pgs_typed(3SCF)
scf_iter_instance_pgs_typed_composed(3SCF)
scf_iter_instance_snapshots(3SCF)
scf_iter_property_values(3SCF)
scf_iter_service_instances(3SCF)
scf_iter_service_pgs_typed(3SCF)
scf_iter_snaplevel_pgs_typed(3SCF)
scf_pg_get_parent_instance(3SCF)
scf_pg_get_parent_service(3SCF)
scf_pg_get_parent_snaplevel(3SCF)
scf_pg_get_underlying_pg(3SCF)
scf_service_add_instance(3SCF)
scf_service_get_instance(3SCF)
scf_simple_app_props_free(3SCF)
scf_simple_app_props_get(3SCF)
scf_simple_app_props_next(3SCF)
scf_simple_app_props_search(3SCF)
scf_simple_prop_next_astring(3SCF)
scf_simple_prop_next_boolean(3SCF)
scf_simple_prop_next_count(3SCF)
scf_simple_prop_next_integer(3SCF)
scf_simple_prop_next_opaque(3SCF)
scf_simple_prop_next_reset(3SCF)
scf_simple_prop_next_time(3SCF)
scf_simple_prop_next_ustring(3SCF)
scf_simple_prop_numvalues(3SCF)
scf_simple_walk_instances(3SCF)
scf_snaplevel_get_instance_name(3SCF)
scf_snaplevel_get_next_snaplevel(3SCF)
scf_snaplevel_get_parent(3SCF)
scf_snaplevel_get_scope_name(3SCF)
scf_snaplevel_get_service_name(3SCF)
scf_snapshot_get_base_snaplevel(3SCF)
scf_tmpl_error_prop_tmpl(3SCF)
scf_tmpl_error_source_fmri(3SCF)
scf_tmpl_prop_cardinality(3SCF)
scf_tmpl_prop_common_name(3SCF)
scf_tmpl_prop_description(3SCF)
scf_tmpl_prop_internal_seps(3SCF)
scf_tmpl_prop_visibility(3SCF)
scf_tmpl_value_common_name(3SCF)
scf_tmpl_value_count_range_choices(3SCF)
scf_tmpl_value_count_range_constraints(3SCF)
scf_tmpl_value_description(3SCF)
scf_tmpl_value_in_constraint(3SCF)
scf_tmpl_value_int_range_choices(3SCF)
scf_tmpl_value_int_range_constraints(3SCF)
scf_tmpl_value_name_choices(3SCF)
scf_tmpl_value_name_constraints(3SCF)
scf_tmpl_visibility_to_string(3SCF)
scf_transaction_destroy_children(3SCF)
scf_transaction_property_change(3SCF)
scf_transaction_property_change_type(3SCF)
scf_transaction_property_delete(3SCF)
scf_transaction_property_new(3SCF)
scf_transaction_reset_all(3SCF)
scf_value_get_as_string_typed(3SCF)
scf_value_set_from_string(3SCF)
stmfGetHostGroupMembers(3STMF)
stmfGetLogicalUnitProperties(3STMF)
stmfGetProviderDataProt(3STMF)
stmfGetTargetGroupMembers(3STMF)
stmfGetTargetProperties(3STMF)
stmfRemoveFromHostGroup(3STMF)
stmfRemoveFromTargetGroup(3STMF)
stmfSetProviderDataProt(3STMF)
sysevent_bind_handle(3SYSEVENT)
sysevent_get_attr_list(3SYSEVENT)
sysevent_get_class_name(3SYSEVENT)
sysevent_get_pub_name(3SYSEVENT)
sysevent_get_subclass_name(3SYSEVENT)
sysevent_get_vendor_name(3SYSEVENT)
sysevent_post_event(3SYSEVENT)
sysevent_subscribe_event(3SYSEVENT)
sysevent_unbind_handle(3SYSEVENT)
sysevent_unsubscribe_event(3SYSEVENT)
tnfctl_filter_list_delete(3TNF)
tnfctl_probe_disconnect_all(3TNF)
volmgt_feature_enabled(3VOLMGT)
wsreg_add_child_component(3WSREG)
wsreg_add_compatible_version(3WSREG)
wsreg_add_dependent_component(3WSREG)
wsreg_add_display_name(3WSREG)
wsreg_add_required_component(3WSREG)
wsreg_can_access_registry(3WSREG)
wsreg_components_equal(3WSREG)
wsreg_create_component(3WSREG)
wsreg_free_component_array(3WSREG)
wsreg_get_child_components(3WSREG)
wsreg_get_compatible_versions(3WSREG)
wsreg_get_dependent_components(3WSREG)
wsreg_get_display_languages(3WSREG)
wsreg_get_display_name(3WSREG)
wsreg_get_required_components(3WSREG)
wsreg_query_get_instance(3WSREG)
wsreg_query_get_location(3WSREG)
wsreg_query_get_unique_name(3WSREG)
wsreg_query_get_version(3WSREG)
wsreg_query_set_instance(3WSREG)
wsreg_query_set_location(3WSREG)
wsreg_query_set_unique_name(3WSREG)
wsreg_query_set_version(3WSREG)
wsreg_remove_child_component(3WSREG)
wsreg_remove_compatible_version(3WSREG)
wsreg_remove_dependent_component(3WSREG)
wsreg_remove_display_name(3WSREG)
wsreg_remove_required_component(3WSREG)
XTSOLgetClientAttributes(3XTSOL)
XTSOLgetPropAttributes(3XTSOL)
- convert internal representation to or from external representation
cc [ flag… ] file… -lsec [ library… ] #include <sys/acl.h> char *acl_totext(acl_t *aclp, int flags);
int acl_fromtext(char *acltextp, acl_t **aclp);
The acl_totext() function converts an internal ACL representation pointed to by aclp into an external ACL representation. The memory for the external text string is obtained using malloc(3C). The caller is responsible for freeing the memory upon completion.
The format of the external ACL is controlled by the flags argument. Values for flags are constructed by a bitwise-inclusive-OR of flags from the following list, defined in <sys/acl.h>.
For NFSv4 ACLs, the ACL entries will be formatted using the compact ACL format detailed in ls(1) for the -V option.
Append the uid or gid for additional user or group entries. This flag is used to construt ACL entries in a manner that is suitable for archive utilities such as tar(1). When the ACL is translated from the external format to internal representation using acl_fromtext(), the appended ID will be used to populate the uid or gid field of the ACL entry when the user or group name does not exist on the host system. The appended id will be ignored when the user or group name does exist on the system.
For NFSv4 ACLs, the ACL entries for user or group entries will use the usersid or groupsid format when the “id” field in the ACL entry is an ephemeral uid or gid. The raw sid format will only be used when the “id” cannot be resolved to a windows name.
The acl_fromtext() function converts an external ACL representation pointed to by acltextp into an internal ACL representation. The memory for the list of ACL entries is obtained using malloc(3C). The caller is responsible for freeing the memory upon completion. Depending on type of ACLs a file system supports, one of two external external representations are possible. For POSIX draft file systems such as ufs, the external representation is described in acltotext(3SEC). The external ACL representation For NFSv4–style ACLs is detailed as follows.
Each acl_entry contains one ACL entry. The external representation of an ACL entry contains three, four or five colon separated fields. The first field contains the ACL entry type. The entry type keywords are defined as:
This ACL entry specifies the access granted to any user or group that does not match any previous ACL entry.
This ACL entry with a GID specifies the access granted to a additional group of the object.
This ACL entry with no GID specified in the ACL entry field specifies the access granted to the owning group of the object.
This ACL entry with a SID or Windows name specifies the access granted to a Windows group. This type of entry is for a SMB server created file.
This ACL entry with no UID specified in the ACL entry field specifies the access granted to the owner of the object.
This ACL entry with a SID or Windows name when the entry could be either a group or a user.
This ACL entry with a UID specifies the access granted to a additional user of the object.
This ACL entry with a SID or Windows name specifies the access granted to a Windows user. This type of entry is for a SMB server created file.
The second field contains the ACL entry ID, and is used only for user or group ACL entries. This field is not used for owner@, group@, or everyone@ entries.
This field contains a user-name or user-ID. If the user-name cannot be resolved to a UID, then the entry is assumed to be a numeric UID.
This field contains a group-name or group-ID. If the group-name can't be resolved to a GID, then the entry is assumed to be a numeric GID.
The third field contains the discretionary access permissions. The format of the permissions depends on whether ACL_COMPACT_FMT is specified. When the flags field does not request ACL_COMPACT_FMT, the following format is used with a forward slash (/) separating the permissions.
Add a file to a directory.
Add a subdirectory.
Append data.
Delete.
Delete child.
Execute permission.
List a directory.
Read ACL.
Read permission.
Read attributes.
Read named attributes.
Synchronize.
Write ACL.
Write attributes.
Write permission.
Write owner.
Write named attributes.
This format allows permissions to be specified as, for example: read_data/read_xattr/read_attributes.
When ACL_COMPACT_FMT is specified, the permissions consist of 14 unique letters. A hyphen (-) character is used to indicate that the permission at that position is not specified.
read attributes
write attributes
read ACL
write ACL
delete
delete child
write owner
append
read_data
read named attributes
synchronize
write_data
write named attributes
execute
This format allows compact permissions to be represented as, for example: rw--d-a-------
The fourth field is optional when ACL_COMPACT_FMT is not specified, in which case the field will be present only when the ACL entry has inheritance flags set. The following is the list of inheritance flags separated by a slash (/) character.
ACE_DIRECTORY_INHERIT_ACE
ACE_FILE_INHERIT_ACE
ACE_INHERIT_ONLY_ACE
ACE_NO_PROPAGATE_INHERIT_ACE
When ACL_COMPACT_FMT is specified the inheritance will always be present and is represented as positional arguments. A hyphen (-) character is used to indicate that the inheritance flag at that position is not specified.
dir_inherit
file_inherit
failed access (not currently supported)
inherit_only
no_propagate
successful access (not currently supported)
The fifth field contains the type of the ACE (allow or deny):
The mask specified in field three should be allowed.
The mask specified in field three should be denied.
Upon successful completion, the acl_totext() function returns a pointer to a text string. Otherwise, it returns NULL.
Upon successful completion, the acl_fromtext() function returns 0. Otherwise, the return value is set to one of the following:
A field that should be blank is not blank.
An invalid ACL flag was specified.
An invalid inheritance field was specified.
An invalid access type was specified.
The string is NULL.
The required user or group name not found.
The ACL needs more fields to be specified.
The permission mask is invalid.
Unknown data was found in the ACL.
Example 1 Examples of permissions when ACL_COMPACT_FMT is not specified.
user:joe:read_data/write_data:file_inherit/dir_inherit:allow
owner@:read_acl:allow,user:tom:read_data:file_inherit/inherit_only:deny
Example 2 Examples of permissions when ACL_COMPACT_FMT is specified.
user:joe:rw------------:fd----:allow
owner@:----------c---:------allow,user:tom:r-------------:f-i---:deny
See attributes(5) for descriptions of the following attributes:
|
ls(1), tar(1), acl(2), malloc(3C), aclfromtext(3SEC), acl(5), attributes(5)