New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment file does not respect all.adminpath
#2106
Comments
Hi Guilherme.
By all means, please fix this as suggested.
Andy
…On Fri, 13 Oct 2023, Guilherme Amadio wrote:
In https://xrootd.slac.stanford.edu/doc/dev561/xrd_config.htm#_Toc135684283, the docs say that the environment file should be opened inside `all.adminpath`. However, in code, `/tmp` is hard-coded:
https://github.com/xrootd/xrootd/blob/e7cf81f82d177b768f740b9db28e669b09273ca6/src/Xrd/XrdConfig.cc#L1047-L1066
I made a change for "fixing" this, in case it should indeed respect `all.adminpath`. I found this out because I saw test failures after running the newly added tests as different users on my machine. They both wanto create `/tmp/xrootd.anon.env`, but in the second attempt, it already exists and is owned by someone else, which makes xrootd fail to initialize.
Proposed solution:
```diff
--- a/src/Xrd/XrdConfig.cc
+++ b/src/Xrd/XrdConfig.cc
@@ -1058,7 +1058,7 @@ void XrdConfig::Manifest(const char *pidfn)
//
if (pidfn && (Slash = rindex(pidfn, '/')))
{strncpy(manBuff, pidfn, Slash-pidfn); pidP = manBuff+(Slash-pidfn);}
- else {strcpy(manBuff, "/tmp"); pidP = manBuff+4;}
+ else {strcpy(manBuff, ProtInfo.AdmPath); pidP = manBuff+strlen(ProtInfo.AdmPath);}
```
Tested and it works to make the env file appear inside `all.adminpath` instead of `/tmp`.
--
Reply to this email directly or view it on GitHub:
#2106
You are receiving this because you were assigned.
Message ID: ***@***.***>
|
@abh3, ok, great. I will merge this into 5.6.3 then. Cheers, |
amadio
added a commit
to amadio/xrootd
that referenced
this issue
Oct 20, 2023
amadio
added a commit
to amadio/xrootd
that referenced
this issue
Oct 20, 2023
amadio
added a commit
to amadio/xrootd
that referenced
this issue
Oct 20, 2023
amadio
added a commit
to amadio/xrootd
that referenced
this issue
Oct 26, 2023
amadio
added a commit
to amadio/xrootd
that referenced
this issue
Oct 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In https://xrootd.slac.stanford.edu/doc/dev561/xrd_config.htm#_Toc135684283, the docs say that the environment file should be opened inside
all.adminpath
. However, in code,/tmp
is hard-coded:xrootd/src/Xrd/XrdConfig.cc
Lines 1057 to 1061 in e7cf81f
I made a change for "fixing" this, in case it should indeed respect
all.adminpath
. I found this out because I saw test failures after running the newly added tests as different users on my machine. They both wanto create/tmp/xrootd.anon.env
, but in the second attempt, it already exists and is owned by someone else, which makes xrootd fail to initialize.Proposed solution:
Tested and it works to make the env file appear inside
all.adminpath
instead of/tmp
.The text was updated successfully, but these errors were encountered: