Created
December 7, 2008 09:44
-
-
Save hernad/33073 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Etc | |
class Passwd < FFI::Struct | |
@@@ | |
struct do |s| | |
s.include "sys/types.h" | |
s.include "pwd.h" | |
s.name "struct passwd" | |
s.field :pw_name, :string | |
s.field :pw_passwd, :string | |
s.field :pw_uid, :uint | |
s.field :pw_gid, :uint | |
s.field :pw_dir, :string | |
s.field :pw_shell, :string | |
end | |
@@@ | |
end | |
class Group < FFI::Struct | |
@@@ | |
struct do |s| | |
s.include "sys/types.h" | |
s.include "grp.h" | |
s.name "struct group" | |
s.field :gr_name, :string | |
s.field :gr_gid, :uint | |
end | |
@@@ | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment