[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DDL-ML] Alles als root? Neee.




I'm not quite happy with running programs as root which do not need to
be. I deleted the lines in erddcd.c testing for root

   setuid(0);
   if (geteuid()!=0) {
      fprintf(stderr,"\nOoops, only user 'root' can start erddcd! Abort!\n\n");
      fprintf(stderr,"you can solve this problem on two ways:\n\n");
	/* .... */
   }

The erddcd runs perfectly fine if I use a tty (example /dev/ttyS0)
which has the right permissions for the user running erddcd. As the
erddcd is listening on the net, I feel a lot more comfortable if it is
not run as root. Maybee the explanations (if needed at all) can be
printed when failing to open the tty in init_comport?

Kurzfassung: erddcd funktioniert genauso gut auch ohne root.

Harald.