Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
c6acb71e
Commit
c6acb71e
authored
16 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Provide more meaningful error messages for security violations
Provide hint about invalid SlurmUser
parent
15aee95f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/slurmd/slurmd/req.c
+7
-1
7 additions, 1 deletion
src/slurmd/slurmd/req.c
with
7 additions
and
1 deletion
src/slurmd/slurmd/req.c
+
7
−
1
View file @
c6acb71e
...
@@ -1391,12 +1391,18 @@ _rpc_ping(slurm_msg_t *msg)
...
@@ -1391,12 +1391,18 @@ _rpc_ping(slurm_msg_t *msg)
{
{
int
rc
=
SLURM_SUCCESS
;
int
rc
=
SLURM_SUCCESS
;
uid_t
req_uid
=
g_slurm_auth_get_uid
(
msg
->
auth_cred
,
NULL
);
uid_t
req_uid
=
g_slurm_auth_get_uid
(
msg
->
auth_cred
,
NULL
);
static
bool
first_msg
=
true
;
if
(
!
_slurm_authorized_user
(
req_uid
))
{
if
(
!
_slurm_authorized_user
(
req_uid
))
{
error
(
"Security violation, ping RPC from uid %u"
,
error
(
"Security violation, ping RPC from uid %u"
,
(
unsigned
int
)
req_uid
);
(
unsigned
int
)
req_uid
);
if
(
first_msg
)
{
error
(
"Do you have SlurmUser configured as uid %u?"
,
(
unsigned
int
)
req_uid
);
}
rc
=
ESLURM_USER_ID_MISSING
;
/* or bad in this case */
rc
=
ESLURM_USER_ID_MISSING
;
/* or bad in this case */
}
}
first_msg
=
false
;
/* Return result. If the reply can't be sent this indicates that
/* Return result. If the reply can't be sent this indicates that
* 1. The network is broken OR
* 1. The network is broken OR
...
@@ -1422,7 +1428,7 @@ _rpc_health_check(slurm_msg_t *msg)
...
@@ -1422,7 +1428,7 @@ _rpc_health_check(slurm_msg_t *msg)
uid_t
req_uid
=
g_slurm_auth_get_uid
(
msg
->
auth_cred
,
NULL
);
uid_t
req_uid
=
g_slurm_auth_get_uid
(
msg
->
auth_cred
,
NULL
);
if
(
!
_slurm_authorized_user
(
req_uid
))
{
if
(
!
_slurm_authorized_user
(
req_uid
))
{
error
(
"Security violation,
ping
RPC from uid %u"
,
error
(
"Security violation,
health check
RPC from uid %u"
,
(
unsigned
int
)
req_uid
);
(
unsigned
int
)
req_uid
);
rc
=
ESLURM_USER_ID_MISSING
;
/* or bad in this case */
rc
=
ESLURM_USER_ID_MISSING
;
/* or bad in this case */
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment