updated on Sun Jan 22 12:09:12 UTC 2012
[aur-mirror.git] / libnss-pgsql / getgr-conf.patch
blobd9a01a85935ad99d10deb8d1de3230d3db53852d
1 --- libnss-pgsql-1.5.0-beta/conf/nss-pgsql.conf.org 2008-08-19 11:44:37.000000000 +0200
2 +++ libnss-pgsql-1.5.0-beta/conf/nss-pgsql.conf 2010-10-24 16:28:25.052523000 +0200
3 @@ -22,10 +22,10 @@ getpwnam = SELECT username, passw
4 getpwuid = SELECT username, passwd, gecos, homedir, shell, uid, gid FROM passwd_table WHERE uid = $1
5 # All users
6 allusers = SELECT username, passwd, gecos, homedir, shell, uid, gid FROM passwd_table
7 -# Must return group_name, group_passwd, group_gid
8 -getgrnam = SELECT groupname, passwd, gid, array_to_string(SELECT username FROM usergroups WHERE usergroups.gid = group_table.gid),chr(10)) as members FROM group_table WHERE groupname = $1
9 -# Must return group_name, group_passwd, group_gid
10 -getgrgid = SELECT groupname, passwd, gid, array_to_string(SELECT username from usergroups WHERE usergroups.gid = group_table.gid),chr(10)) as members FROM group_table WHERE gid = $1
11 +# Must return group_name, group_passwd, group_gid and optional all members seperated by "\n" aka chr(10)
12 +getgrnam = SELECT groupname, passwd, gid, array_to_string(ARRAY(SELECT username FROM usergroups JOIN passwd_table USING (uid) WHERE usergroups.gid = group_table.gid),chr(10)) as members FROM group_table WHERE groupname = $1
13 +# Must return group_name, group_passwd, group_gid and optional all members seperated by "\n" aka chr(10)
14 +getgrgid = SELECT groupname, passwd, gid, array_to_string(ARRAY(SELECT username FROM usergroups JOIN passwd_table USING (uid) WHERE usergroups.gid = group_table.gid),chr(10)) as members FROM group_table WHERE gid = $1
15 # Must return gid. %s MUST appear first for username match in where clause
16 groups_dyn = SELECT ug.gid FROM passwd_table JOIN usergroups ug USING (uid) where username = $1 and ug.gid <> $2