All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit e788fd7a authored by Leigh B Stoller's avatar Leigh B Stoller

Use unix_uid in lookup, instead of uid. uid_idx not readily available.

parent 7d76c492
......@@ -308,11 +308,12 @@ class EmulabServer:
self.clientip = clientip;
self.debug = debug;
self.instances = {};
self.unix_uid = os.getuid()
self.uid = pwd.getpwuid(os.getuid())[0]
res = DBQueryFatal("select uid_idx from users "
"where uid=%s and status='active'",
"where unix_uid=%s and uid=%s",
(self.unix_uid, self.uid))
if len(res) == 0:
self.uid_idx = res[0][0]
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