jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisSystem.java
changeset 30044 bab15bbe2ca3
parent 25859 3317bb8137f4
child 34894 3248b89d1921
equal deleted inserted replaced
30043:b0dd05ec3db1 30044:bab15bbe2ca3
    24  */
    24  */
    25 
    25 
    26 package com.sun.security.auth.module;
    26 package com.sun.security.auth.module;
    27 
    27 
    28 /**
    28 /**
    29  * <p> This class implementation retrieves and makes available Solaris
    29  * This class implementation retrieves and makes available Solaris
    30  * UID/GID/groups information for the current user.
    30  * UID/GID/groups information for the current user.
    31  *
    31  *
    32  * @deprecated replaced by {@link UnixSystem}.
    32  * @deprecated replaced by {@link UnixSystem}.
    33  */
    33  */
    34 @jdk.Exported(false)
    34 @jdk.Exported(false)
    41     protected long uid;
    41     protected long uid;
    42     protected long gid;
    42     protected long gid;
    43     protected long[] groups;
    43     protected long[] groups;
    44 
    44 
    45     /**
    45     /**
    46      * Instantiate a <code>SolarisSystem</code> and load
    46      * Instantiate a {@code SolarisSystem} and load
    47      * the native library to access the underlying system information.
    47      * the native library to access the underlying system information.
    48      */
    48      */
    49     public SolarisSystem() {
    49     public SolarisSystem() {
    50         System.loadLibrary("jaas_unix");
    50         System.loadLibrary("jaas_unix");
    51         getSolarisInfo();
    51         getSolarisInfo();
    52     }
    52     }
    53 
    53 
    54     /**
    54     /**
    55      * Get the username for the current Solaris user.
    55      * Get the username for the current Solaris user.
    56      *
    56      *
    57      * <p>
       
    58      *
       
    59      * @return the username for the current Solaris user.
    57      * @return the username for the current Solaris user.
    60      */
    58      */
    61     public String getUsername() {
    59     public String getUsername() {
    62         return username;
    60         return username;
    63     }
    61     }
    64 
    62 
    65     /**
    63     /**
    66      * Get the UID for the current Solaris user.
    64      * Get the UID for the current Solaris user.
    67      *
       
    68      * <p>
       
    69      *
    65      *
    70      * @return the UID for the current Solaris user.
    66      * @return the UID for the current Solaris user.
    71      */
    67      */
    72     public long getUid() {
    68     public long getUid() {
    73         return uid;
    69         return uid;
    74     }
    70     }
    75 
    71 
    76     /**
    72     /**
    77      * Get the GID for the current Solaris user.
    73      * Get the GID for the current Solaris user.
    78      *
    74      *
    79      * <p>
       
    80      *
       
    81      * @return the GID for the current Solaris user.
    75      * @return the GID for the current Solaris user.
    82      */
    76      */
    83     public long getGid() {
    77     public long getGid() {
    84         return gid;
    78         return gid;
    85     }
    79     }
    86 
    80 
    87     /**
    81     /**
    88      * Get the supplementary groups for the current Solaris user.
    82      * Get the supplementary groups for the current Solaris user.
    89      *
    83      *
    90      * <p>
       
    91      *
       
    92      * @return the supplementary groups for the current Solaris user.
    84      * @return the supplementary groups for the current Solaris user.
    93      */
    85      */
    94     public long[] getGroups() {
    86     public long[] getGroups() {
    95         return groups == null ? null : groups.clone();
    87         return groups == null ? null : groups.clone();
    96     }
    88     }