summaryrefslogtreecommitdiff
path: root/lib-src/emacsclient.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1992-01-14 08:05:08 +0000
committerJim Blandy <jimb@redhat.com>1992-01-14 08:05:08 +0000
commit68a9f5b02cbcf50b6a38430ffdba630b7c61d656 (patch)
tree62dbffc3eb70839deac2adc3974fc4898bbed9f3 /lib-src/emacsclient.c
parente3c7b1c67ca26eb6dd0d97c78b680614b96efa1c (diff)
downloademacs-68a9f5b02cbcf50b6a38430ffdba630b7c61d656.tar.gz
*** empty log message ***
Diffstat (limited to 'lib-src/emacsclient.c')
-rw-r--r--lib-src/emacsclient.c40
1 files changed, 19 insertions, 21 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 89e90b250ff..bd2edf62993 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -1,4 +1,4 @@
-/* Client process that communicates with GNU Emacs acting as server.`
+/* Client process that communicates with GNU Emacs acting as server.
Copyright (C) 1986, 1987 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -49,13 +49,10 @@ main (argc, argv)
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
+#include <sys/stat.h>
#include <stdio.h>
#include <errno.h>
-#ifndef SERVER_HOME_DIR
-#include <sys/stat.h>
-#endif
-
extern int sys_nerr;
extern char *sys_errlist[];
extern int errno;
@@ -70,9 +67,6 @@ main (argc, argv)
struct sockaddr_un server;
char *homedir, *cwd, *str;
char string[BUFSIZ];
-#ifndef SERVER_HOME_DIR
- struct stat statbfr;
-#endif
char *getenv (), *getwd ();
int geteuid ();
@@ -95,19 +89,23 @@ main (argc, argv)
}
server.sun_family = AF_UNIX;
#ifndef SERVER_HOME_DIR
- gethostname (system_name, sizeof (system_name));
- sprintf (server.sun_path, "/tmp/esrv%d-%s", geteuid (), system_name);
-
- if (stat (server.sun_path, &statbfr) == -1)
- {
- perror ("stat");
- exit (1);
- }
- if (statbfr.st_uid != geteuid())
- {
- fprintf (stderr, "Illegal socket owner\n");
- exit (1);
- }
+ {
+ struct stat statbfr;
+
+ gethostname (system_name, sizeof (system_name));
+ sprintf (server.sun_path, "/tmp/esrv%d-%s", geteuid (), system_name);
+
+ if (stat (server.sun_path, &statbfr) == -1)
+ {
+ perror ("stat");
+ exit (1);
+ }
+ if (statbfr.st_uid != geteuid())
+ {
+ fprintf (stderr, "Illegal socket owner\n");
+ exit (1);
+ }
+ }
#else
if ((homedir = getenv ("HOME")) == NULL)
{