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 } |