Reset the user privileges in case popauth is installed setuid.
Showing
1 changed file
with
4 additions
and
1 deletions
... | @@ -270,12 +270,15 @@ action_create (struct action_data *ap) | ... | @@ -270,12 +270,15 @@ action_create (struct action_data *ap) |
270 | char buf[256]; | 270 | char buf[256]; |
271 | int line = 0; | 271 | int line = 0; |
272 | 272 | ||
273 | /* Make sure we have proper privileges if popauth is setuid */ | ||
274 | setuid (getuid ()); | ||
275 | |||
273 | if (ap->input_name) | 276 | if (ap->input_name) |
274 | { | 277 | { |
275 | fp = fopen (ap->input_name, "r"); | 278 | fp = fopen (ap->input_name, "r"); |
276 | if (!fp) | 279 | if (!fp) |
277 | { | 280 | { |
278 | mu_error("can't create %s: %s", ap->input_name, strerror (errno)); | 281 | mu_error("can't open %s: %s", ap->input_name, strerror (errno)); |
279 | return 1; | 282 | return 1; |
280 | } | 283 | } |
281 | } | 284 | } | ... | ... |
-
Please register or sign in to post a comment