mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Added SELInux hacks and did some cleanups.
This commit is contained in:
parent
d44906ad4d
commit
151ca81f1a
22 changed files with 396 additions and 62 deletions
|
@ -577,17 +577,24 @@ change_login (const char *args)
|
|||
for (args++; spacep (args); args++)
|
||||
;
|
||||
fp = fopen (args, "rb");
|
||||
if (fp && is_secured_file (fileno (fp)))
|
||||
{
|
||||
fclose (fp);
|
||||
fp = NULL;
|
||||
errno = EPERM;
|
||||
}
|
||||
if (!fp)
|
||||
{
|
||||
tty_printf ("can't open `%s': %s\n", args, strerror (errno));
|
||||
tty_printf (_("can't open `%s': %s\n"), args, strerror (errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
data = xmalloc (254);
|
||||
n = fread (data, 1, 254, fp);
|
||||
fclose (fp);
|
||||
if (n < 0)
|
||||
{
|
||||
tty_printf ("error reading `%s': %s\n", args, strerror (errno));
|
||||
tty_printf (_("error reading `%s': %s\n"), args, strerror (errno));
|
||||
xfree (data);
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue