Move invirt-console/files to invirt-console/server
[invirt/packages/invirt-console.git] / server / etc / nss-pgsql.conf.mako
diff --git a/server/etc/nss-pgsql.conf.mako b/server/etc/nss-pgsql.conf.mako
new file mode 100644 (file)
index 0000000..5ed9f2e
--- /dev/null
@@ -0,0 +1,10 @@
+<% from invirt.config import structs as cfg %>
+connectionstring = host=${cfg.db.host} dbname=${cfg.db.dbname} user=${cfg.db.user} port=${cfg.db.port}
+
+getpwnam = SELECT name, '*', name, '/consolefs/'|| name, '/usr/bin/invirt-consolesh', machine_id + 1000, machine_id + 1000 FROM machines WHERE name = $1
+getpwuid = SELECT name, '*', name, '/consolefs/'|| name, '/usr/bin/invirt-consolesh', machine_id + 1000, machine_id + 1000 FROM machines WHERE machine_id + 1000 = $1
+allusers = SELECT name, '*', name, '/consolefs/'|| name, '/usr/bin/invirt-consolesh', machine_id + 1000, machine_id + 1000 FROM machines
+getgrnam = SELECT name, 'x', machine_id + 1000, NULL FROM machines WHERE name = $1
+getgrgid = SELECT name, 'x', machine_id + 1000, NULL FROM machines WHERE machine_id + 1000 = $1
+groups_dyn = SELECT NULL LIMIT 0;
+allgroups = SELECT name, 'x', machine_id + 1000, NULL FROM machines