Commit 35e306cc authored by Leigh B. Stoller's avatar Leigh B. Stoller

Fix up mounts command to make sure that groups are respected; we were

return mount specs for people in the project instead of the group.
Harmless, since the mounts would fail as long as exports_setup was
doing the right thing.
parent 609c547e
...@@ -1815,17 +1815,17 @@ domounts(int sock, struct in_addr ipaddr, char *rdata, int tcp) ...@@ -1815,17 +1815,17 @@ domounts(int sock, struct in_addr ipaddr, char *rdata, int tcp)
#ifdef NOSHAREDEXPTS #ifdef NOSHAREDEXPTS
res = mydb_query("select u.uid from users as u " res = mydb_query("select u.uid from users as u "
"left join group_membership as p on p.uid=u.uid " "left join group_membership as p on p.uid=u.uid "
"where p.pid='%s' and p.pid=p.gid and " "where p.pid='%s' and p.gid='%s' and "
" u.status='active'", " u.status='active'",
1, pid); 1, pid, gid);
#else #else
res = mydb_query("select distinct u.uid from users as u " res = mydb_query("select distinct u.uid from users as u "
"left join exppid_access as a " "left join exppid_access as a "
" on a.exp_pid='%s' and a.exp_eid='%s' " " on a.exp_pid='%s' and a.exp_eid='%s' "
"left join group_membership as p on p.uid=u.uid " "left join group_membership as p on p.uid=u.uid "
"where ((p.pid='%s' and p.pid=p.gid) or p.pid=a.pid) " "where ((p.pid='%s' and p.gid='%s') or p.pid=a.pid) "
" and u.status='active'", " and u.status='active'",
1, pid, eid, pid); 1, pid, eid, pid, gid);
#endif #endif
if (!res) { if (!res) {
syslog(LOG_ERR, "MOUNTS: %s: DB Error getting users!", pid); syslog(LOG_ERR, "MOUNTS: %s: DB Error getting users!", pid);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment