From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078718211932.tru64-unix-managers.marc@archive.invalid> From: "richard n. frank" Date: Tue, 25 Aug 1998 14:49:39 +0000 To: tru64-unix-managers Subject: Follow-up to:C program to mount/umount disks X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078718211932 Georg Buesse provided the C program below as a means to allow users to mount and umount jaz disks. Randall S. Winchester" and Serguei Patchkovskii" warn that installing this type of program with the suid bit set would make the system vulnerable to buffer overflow type security attacks. Thanks again to everyone who responded. rich frank ---------------------------------------------------------------------- > #include > #include > #include > > main(argc, argv) > char *argv[]; > int argc; > { > char sys_call[50]; > const char user[] = "root"; > if (argc != 1) > { > printf("Bitte Aufrufsyntax beachten! \n"); > printf("z.B:> start_script \n"); > }else { > > sprintf(sys_call, "/home/xxxxx/start_script.sh %s \0 ", ""); > printf ("%s \n" , sys_call); > /*printf ("%s \n", user);*/ > setpcred(user,NULL); > system (sys_call); > } > }