*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> get_secdef_int (3)              
Title
Content
Arch
Section
 

Contents


 secdef(3)                                                         secdef(3)




 NAME    [Toc]    [Back]
      secdef - security defaults configuration file routines

 SYNOPSIS    [Toc]    [Back]
      #include <prot.h>

      int open_secdef (void);

      int close_secdef (void);

      int get_secdef_str(char *parameter, char *value);

      int get_secdef_int(char *parameter, char *value);

 DESCRIPTION    [Toc]    [Back]
      open_secdef opens the security configuration file
      /etc/default/security.  This function must be called prior to calling
      get_secdef_str or get_secdef_int.

      close_secdef closes the security configuration file.

      get_secdef_str and get_secdef_int return the value of the specified
      parameter defined in the security configuration file.  See the
      security(4) manpage.

      Programs using these routines must be compiled with -lsec.

 APPLICATION USAGE    [Toc]    [Back]
      In a multithreaded application, these interfaces are thread-safe, but
      not async-cancel-safe.  A cancellation point may occur when a thread
      is executing any of these interfaces.

 RETURN VALUE    [Toc]    [Back]
      open_secdef returns a value of 0 if the open completed successfully.
      Otherwise, it returns -1 and leaves errno unchanged from the fstat
      call.  get_secdef_str and get_secdef_int return the following:

            0   The value of the specified parameter was successfully
                returned.
           -1   The entry was not found, or the security configuration file
                was not opened.
           -2   The format of the entry was incorrect.

 EXAMPLES    [Toc]    [Back]
      This example obtains the "path" from the SU_DEFAULT_PATH=<path>
      parameter.

           char supath[MAXPATHLEN+100];

           if (open_secdef() == 0) {
                   if (get_secdef_str("SU_DEFAULT_PATH", supath) == 0)



 Hewlett-Packard Company            - 1 -      HP-UX 11i Version 2: Sep 2004






 secdef(3)                                                         secdef(3)




                           printf("su path is %s", supath);
                   close_secdef()
           }

 FILES    [Toc]    [Back]
      /etc/default/security         Security defaults configuration file.

 SEE ALSO    [Toc]    [Back]
      security(4).


 Hewlett-Packard Company            - 2 -      HP-UX 11i Version 2: Sep 2004
[ Back ]
      
      
 Similar pages
Name OS Title
security HP-UX security defaults configuration file
matrix.conf Tru64 SIA (Security Integration Architecture) configuration file
ldapfilter.conf Linux configuration file for LDAP get filter routines
ldaptemplates.conf Linux configuration file for LDAP display template routines
ldapsearchprefs.conf Linux configuration file for LDAP search preference routines
vendors.list Linux Security key configuration for APT
audit_setup Tru64 Audit subsystem configuration graphical interface (Enhanced Security)
auditconfig Tru64 Audit subsystem configuration graphical interface (Enhanced Security)
rcS Linux defaults used at boot time
sysctl.conf FreeBSD kernel state defaults
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service