Module: Puppet::Etc Private
- Defined in:
- lib/puppet/etc.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
-
.endgrent ⇒ Object
private
closes handle to /etc/group file.
-
.endpwent ⇒ Object
private
closes handle to /etc/passwd file.
-
.getgrent ⇒ Object
private
Etc::getgrent returns an Etc::Group struct object On first call opens /etc/group and returns parse of first entry.
-
.getgrgid(id) ⇒ Object
private
Etc::getgrid searches /etc/group file for an entry corresponding to id.
-
.getgrnam(groupname) ⇒ Object
private
Etc::getgrnam searches /etc/group file for an entry corresponding to groupname.
-
.getpwent ⇒ Object
private
Etc::getpwent returns an Etc::Passwd struct object On first call opens /etc/passwd and returns parse of first entry.
-
.getpwnam(username) ⇒ Object
private
Etc::getpwnam searches /etc/passwd file for an entry corresponding to username.
-
.getpwuid(id) ⇒ Object
private
Etc::getpwuid searches /etc/passwd file for an entry corresponding to id.
-
.setgrent ⇒ Object
private
effectively equivalent to IO#rewind of /etc/group.
-
.setpwent ⇒ Object
private
effectively equivalent to IO#rewind of /etc/passwd.
Class Method Details
.endgrent ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
closes handle to /etc/group file
25 26 27 |
# File 'lib/puppet/etc.rb', line 25 def endgrent ::Etc.endgrent end |
.endpwent ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
closes handle to /etc/passwd file
42 43 44 |
# File 'lib/puppet/etc.rb', line 42 def endpwent ::Etc.endpwent end |
.getgrent ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Etc::getgrent returns an Etc::Group struct object On first call opens /etc/group and returns parse of first entry. Each subsquent call returns new struct the next entry or nil if EOF. Call ::endgrent to close file.
20 21 22 |
# File 'lib/puppet/etc.rb', line 20 def getgrent convert_field_values_to_utf8!(::Etc.getgrent) end |
.getgrgid(id) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Etc::getgrid searches /etc/group file for an entry corresponding to id. returns an Etc::Group struct corresponding to the entry or raises ArgumentError if none
69 70 71 |
# File 'lib/puppet/etc.rb', line 69 def getgrgid(id) convert_field_values_to_utf8!(::Etc.getgrgid(id)) end |
.getgrnam(groupname) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Etc::getgrnam searches /etc/group file for an entry corresponding to groupname. returns an Etc::Group struct corresponding to the entry or raises ArgumentError if none
62 63 64 |
# File 'lib/puppet/etc.rb', line 62 def getgrnam(groupname) convert_field_values_to_utf8!(::Etc.getgrnam(groupname)) end |
.getpwent ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Etc::getpwent returns an Etc::Passwd struct object On first call opens /etc/passwd and returns parse of first entry. Each subsquent call returns new struct for the next entry or nil if EOF. Call ::endgrent to close file.
37 38 39 |
# File 'lib/puppet/etc.rb', line 37 def getpwent convert_field_values_to_utf8!(::Etc.getpwent) end |
.getpwnam(username) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Etc::getpwnam searches /etc/passwd file for an entry corresponding to username. returns an Etc::Passwd struct corresponding to the entry or raises ArgumentError if none
55 56 57 |
# File 'lib/puppet/etc.rb', line 55 def getpwnam(username) convert_field_values_to_utf8!(::Etc.getpwnam(username)) end |
.getpwuid(id) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Etc::getpwuid searches /etc/passwd file for an entry corresponding to id. returns an Etc::Passwd struct corresponding to the entry or raises ArgumentError if none
76 77 78 |
# File 'lib/puppet/etc.rb', line 76 def getpwuid(id) convert_field_values_to_utf8!(::Etc.getpwuid(id)) end |
.setgrent ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
effectively equivalent to IO#rewind of /etc/group
30 31 32 |
# File 'lib/puppet/etc.rb', line 30 def setgrent ::Etc.setgrent end |
.setpwent ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
effectively equivalent to IO#rewind of /etc/passwd
47 48 49 |
# File 'lib/puppet/etc.rb', line 47 def setpwent ::Etc.setpwent end |