]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
posix: Add getpwuid, getgrnam, and getgrgid bindings
authorMarcin Lewandowski <www@saepia.net>
Fri, 17 Aug 2012 11:10:12 +0000 (13:10 +0200)
committerJürg Billeter <j@bitron.ch>
Fri, 17 Aug 2012 11:10:12 +0000 (13:10 +0200)
Fixes bug 682015.

vapi/posix.vapi

index 3eeb3aff0eab59280287e3daaa814ef0d28d1e91..dc3cade69d7003f7cd954251cf9e7b2cffa6d645 100644 (file)
@@ -338,6 +338,10 @@ namespace Posix {
        public void endgrent ();
        public unowned Group? getgrent ();
        public void setgrent ();
+       [CCode (cheader_filename = "grp.h")]
+       public unowned Group? getgrgid (gid_t gid);
+       [CCode (cheader_filename = "grp.h")]
+       public unowned Group? getgrnam (string name);
 
        [CCode (cheader_filename = "netinet/in.h")]
        public const int INET_ADDRSTRLEN;
@@ -722,6 +726,8 @@ namespace Posix {
        public void setpwent ();
        [CCode (cheader_filename = "pwd.h")]
        public unowned Passwd? getpwnam (string name);
+       [CCode (cheader_filename = "pwd.h")]
+       public unowned Passwd? getpwuid (uid_t uid);
 
        [CCode (cheader_filename = "sys/resource.h")]
        public const int PRIO_PROCESS;