getprofnam(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

getprofnam(3c)

Standard C Library Functions                                   getprofattr(3C)



NAME
       getprofattr,  getprofnam, free_profattr, setprofattr, endprofattr, get‐
       proflist, free_proflist - get profile description and attributes

SYNOPSIS
       #include <prof_attr.h>


       profattr_t *getprofattr(void);


       profattr_t *getprofnam(const char *name);


       void free_profattr(profattr_t *pd);


       void setprofattr(void);


       void endprofattr(void);


       void getproflist(const char *profname, char **proflist, int *profcnt);


       void free_proflist(char **proflist, int profcnt);

DESCRIPTION
       The getprofattr() and getprofnam() functions each  return  a  prof_attr
       entry.  Entries  can come from any of the sources specified in the nss‐
       witch.conf(5) file.


       The getprofattr() function enumerates prof_attr entries.  The  getprof‐
       nam()  function  searches for a prof_attr entry with a given name. Suc‐
       cessive calls to these functions  return  either  successive  prof_attr
       entries or NULL.


       The internal representation of a prof_attr entry is a profattr_t struc‐
       ture defined in <prof_attr.h> with the following members:



         char  *name;   /* Name of the profile */
         char  *res1;   /* Reserved for future use */
         char  *res2;   /* Reserved for future use */
         char  *desc;   /* Description/Purpose of the profile */
         kva_t *attr;   /* Profile attributes */



       The free_profattr() function releases memory allocated by  the  getpro‐
       fattr() and getprofnam() functions.


       The  setprofattr()  function "rewinds" to the beginning of the enumera‐
       tion of prof_attr entries. Calls to getprofnam() can leave the enumera‐
       tion  in  an  indeterminate  state.  Therefore, setprofattr() should be
       called before the first call to getprofattr().


       The endprofattr() function may be called  to  indicate  that  prof_attr
       processing  is  complete;  the system may then close any open prof_attr
       file, deallocate storage, and so forth.


       The getproflist() function searches for the list of sub-profiles  found
       in  the  given  profname  and  allocates  memory  to store this list in
       proflist. The given profname will be included in the list  of  sub-pro‐
       files.  The  profcnt  argument  indicates the number of items currently
       valid in proflist. Memory allocated by getproflist()  should  be  freed
       using the free_proflist() function.


       The  free_proflist()  function  frees  memory  allocated  by  the  get‐
       proflist() function. The profcnt argument specifies the number of items
       to free from the proflist argument.

RETURN VALUES
       The getprofattr() function returns a pointer to a profattr_t if it suc‐
       cessfully enumerates an entry; otherwise it  returns  NULL,  indicating
       the end of the enumeration.


       The  getprofnam() function returns a pointer to a profattr_t if it suc‐
       cessfully locates the requested entry; otherwise it returns NULL.

USAGE
       Individual attributes in the profattr_t structure can be referred to by
       calling the kva_match(3C) function.


       Because  the  list  of legal keys is likely to expand, any code must be
       written to ignore unknown key-value pairs without error.


       The getprofattr() and getprofnam() functions both allocate  memory  for
       the  pointers  they  return. This memory should be deallocated with the
       free_profattr() function.

FILES
       /etc/security/prof_attr    profiles and their descriptions


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ MT-LevelMT-Safe


SEE ALSO
       auths(1), profiles(1), getauthattr(3C), getexecattr(3C), prof_attr(5)



Oracle Solaris 11.4               17 Aug 2018                  getprofattr(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3