mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:33:56 +00:00
2004-12-09 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* vtysh.c: (vtysh_connect) No reason to call geteuid and getegid, the results were never used.
This commit is contained in:
parent
ad572396fc
commit
09c3adb9e9
@ -1,3 +1,8 @@
|
|||||||
|
2004-12-09 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||||
|
|
||||||
|
* vtysh.c: (vtysh_connect) No reason to call geteuid and getegid,
|
||||||
|
the results were never used.
|
||||||
|
|
||||||
2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||||
|
|
||||||
* vtysh.c: Make several functions static instead of global.
|
* vtysh.c: Make several functions static instead of global.
|
||||||
|
@ -1991,15 +1991,11 @@ vtysh_connect (struct vtysh_client *vclient, const char *path)
|
|||||||
int sock, len;
|
int sock, len;
|
||||||
struct sockaddr_un addr;
|
struct sockaddr_un addr;
|
||||||
struct stat s_stat;
|
struct stat s_stat;
|
||||||
uid_t euid;
|
|
||||||
gid_t egid;
|
|
||||||
|
|
||||||
memset (vclient, 0, sizeof (struct vtysh_client));
|
memset (vclient, 0, sizeof (struct vtysh_client));
|
||||||
vclient->fd = -1;
|
vclient->fd = -1;
|
||||||
|
|
||||||
/* Stat socket to see if we have permission to access it. */
|
/* Stat socket to see if we have permission to access it. */
|
||||||
euid = geteuid();
|
|
||||||
egid = getegid();
|
|
||||||
ret = stat (path, &s_stat);
|
ret = stat (path, &s_stat);
|
||||||
if (ret < 0 && errno != ENOENT)
|
if (ret < 0 && errno != ENOENT)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user