[BACK]Return to oxd.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kxx

Diff for /OpenXM/src/kxx/oxd.c between version 1.2 and 1.3

version 1.2, 2002/10/20 23:38:12 version 1.3, 2002/10/20 23:49:12
Line 1 
Line 1 
 /*  /*
  $OpenXM: OpenXM/src/kxx/oxd.c,v 1.1 2002/10/20 13:13:35 takayama Exp $   $OpenXM: OpenXM/src/kxx/oxd.c,v 1.2 2002/10/20 23:38:12 takayama Exp $
 */  */
   
 #include <stdio.h>  #include <stdio.h>
Line 34  static void couldNotFind(char *s);
Line 34  static void couldNotFind(char *s);
 #if defined(__CYGWIN__)  #if defined(__CYGWIN__)
 int errno;  int errno;
 #endif  #endif
   #define NOBODY 65534
   
 main(int argc, char *argv[]) {  main(int argc, char *argv[]) {
   char sname[1024];    char sname[1024];
Line 43  main(int argc, char *argv[]) {
Line 44  main(int argc, char *argv[]) {
   extern int Serial;    extern int Serial;
   int result;    int result;
   int fd;    int fd;
     int uid;
   
   strcpy(sname,"localhost");    strcpy(sname,"localhost");
   i = 1;    i = 1;
Line 59  main(int argc, char *argv[]) {
Line 61  main(int argc, char *argv[]) {
     i++;      i++;
   }    }
   
     uid = getuid();
     if (uid == 0) {
           /* If I'm a super user, then change uid to nobody. */
           if (setuid(NOBODY) != 0) {
             oxdError("Failed to change uid to nobody (%d)\n",NOBODY);
           }
           fprintf(stderr,"uid is changed to nobody (%d).\n",NOBODY);
     }
   
   if (LocalMode) {    if (LocalMode) {
     if (portControl != -1) {      if (portControl != -1) {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>