Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
70d2a651
Commit
70d2a651
authored
Jan 07, 2015
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mike's attempt to fix FS export problem.
parent
3f867d37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
www/tbauth.php3
www/tbauth.php3
+19
-3
No files found.
www/tbauth.php3
View file @
70d2a651
...
...
@@ -1115,17 +1115,33 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null,
#
if
(
$WITHZFS
&&
$ZFS_NOEXPORT
)
{
$query_result
=
DBQueryFatal
(
"select UNIX_TIMESTAMP(weblogin_last) "
.
DBQueryFatal
(
"select UNIX_TIMESTAMP(weblogin_last)
,weblogin_last
"
.
" from users as u "
.
"left join user_stats as s on s.uid_idx=u.uid_idx "
.
"where u.uid_idx='
$uid_idx
'"
);
if
(
mysql_num_rows
(
$query_result
))
{
$lastrow
=
mysql_fetch_row
(
$query_result
);
$lastlogin
=
$lastrow
[
0
];
$lastloginstr
=
$lastrow
[
1
];
if
(
time
()
-
$lastlogin
>
(
24
*
3600
))
{
SUEXEC
(
"nobody"
,
"nobody"
,
"webexports_setup"
,
SUEXEC_ACTION_DIE
);
# Update weblogin_last first so exports_setup
# will do something.
DBQueryFatal
(
"update user_stats set "
.
" weblogin_last=now() "
.
"where uid_idx='
$uid_idx
'"
);
$rv
=
SUEXEC
(
"nobody"
,
"nobody"
,
"webexports_setup"
,
SUEXEC_ACTION_IGNORE
);
# failed, reset the timestamp
if
(
$rv
)
{
DBQueryFatal
(
"update user_stats set "
.
" weblogin_last='
$lastloginstr
' "
.
"where uid_idx='
$uid_idx
'"
);
SUEXECERROR
(
SUEXEC_ACTION_DIE
);
return
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment