Commit cfd91409 authored by Mike Hibler's avatar Mike Hibler

Hack to recognize /proj, /users, etc paths as valid in the AMD case.

parent 2eab9b24
......@@ -764,6 +764,24 @@ allow_stddirs(char *imageid,
FrisInfo("%s: exists=%d, resolves to: '%s'",
imageid, exists, tpath);
#ifdef WITHAMD
/*
* We have to explicitly check for the AMD prefix.
* The realpath resolution in emulab_init checks the root of
* each filesystem (e.g. "/proj") which won't be an AMD symlink,
* only the contents of the directories will be
* (e.g. "/proj/emulab-ops"). And, as of right now, we do not
* know which of /users, /proj, /groups and /share might be an
* AMD mount point.
*/
if (strncmp(AMD_ROOT, tpath, strlen(AMD_ROOT)) == 0) {
free(fpath);
fpath = mystrdup(tpath + strlen(AMD_ROOT));
if (debug)
FrisInfo("%s: stripped AMD prefix", fpath);
}
#endif
/*
* Make the appropriate access checks for get/put
*/
......
......@@ -68,5 +68,6 @@
#undef NOVIRTNFSMOUNTS
#undef WITHZFS
#undef WITHAMD
#undef AMD_ROOT
#undef BS_IQN_PREFIX
......@@ -5524,6 +5524,10 @@ fi
if test $WITHAMD -eq 1; then
cat >>confdefs.h <<_ACEOF
#define WITHAMD 1
_ACEOF
cat >>confdefs.h <<_ACEOF
#define AMD_ROOT "$AMD_ROOT"
_ACEOF
fi
......
......@@ -665,6 +665,7 @@ if test $WITHZFS -eq 1; then
fi
if test $WITHAMD -eq 1; then
AC_DEFINE_UNQUOTED(WITHAMD, 1)
AC_DEFINE_UNQUOTED(AMD_ROOT, "$AMD_ROOT")
fi
AC_DEFINE_UNQUOTED(IMPORT_TMPDIR, "$IMPORT_TMPDIR")
......
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