Skip to content

Commit a5e309c

Browse files
authored
Merge pull request #55 from matyasselmeci/pr/multiuser-log-access-deny
Log that it's xrootd-multiuser denying access, not the file system
2 parents 4851e96 + edc36de commit a5e309c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/UserSentry.hh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,18 @@ public:
152152
} while (1);
153153
if (result == nullptr) {
154154
if (retval) { // There's an actual error in the lookup.
155-
m_log.Emsg("UserSentry", "Failure when looking up UID for username", username.c_str(), strerror(retval));
155+
m_log.Emsg("UserSentry", "Multiuser denying access: Failure when looking up UID for username", username.c_str(), strerror(retval));
156156
} else { // Username doesn't exist.
157-
m_log.Emsg("UserSentry", "XRootD mapped request to username that does not exist:", username.c_str());
157+
m_log.Emsg("UserSentry", "Multiuser denying access: XRootD mapped request to username that does not exist:", username.c_str());
158158
}
159159
return;
160160
}
161161
if (pwd.pw_uid < g_minimum_uid) {
162-
m_log.Emsg("UserSentry", "Username", username.c_str(), "maps to a system UID; rejecting lookup");
162+
m_log.Emsg("UserSentry", "Multiuser denying access: Username", username.c_str(), "maps to a system UID; rejecting lookup");
163163
return;
164164
}
165165
if (pwd.pw_gid < g_minimum_gid) {
166-
m_log.Emsg("UserSentry", "Username", username.c_str(), "maps to a system GID; rejecting lookup");
166+
m_log.Emsg("UserSentry", "Multiuser denying access: Username", username.c_str(), "maps to a system GID; rejecting lookup");
167167
return;
168168
}
169169

@@ -181,7 +181,7 @@ public:
181181
break;
182182
} while (1);
183183
if (-1 == retval) {
184-
m_log.Emsg("UserSentry", "Failure when looking up supplementary groups for username", username.c_str());
184+
m_log.Emsg("UserSentry", "Multiuser denying access: Failure when looking up supplementary groups for username", username.c_str());
185185
return;
186186
}
187187

@@ -192,7 +192,7 @@ public:
192192
m_log.Emsg("UserSentry", "Switching FS uid for user", username.c_str());
193193
m_orig_uid = setfsuid(result->pw_uid);
194194
if (m_orig_uid < 0) {
195-
m_log.Emsg("UserSentry", "Failed to switch FS uid for user", username.c_str());
195+
m_log.Emsg("UserSentry", "Multiuser denying access: Failed to switch FS uid for user", username.c_str());
196196
return;
197197
}
198198
m_orig_gid = setfsgid(result->pw_gid);

0 commit comments

Comments
 (0)