From: "richard n. frank" <rnfrank () wolfram ! llnl ! gov>
To: tru64-unix-managers
Subject: Follow-up to:C program to mount/umount disks
Date: Tue, 25 Aug 1998 14:49:39 +0000 [thread overview]
Message-ID: <96078718211932.tru64-unix-managers.marc@archive.invalid> (raw)
Georg Buesse provided the C program below as a means to allow users
to mount and umount jaz disks.
Randall S. Winchester" <rsw@Glue.umd.edu> and
Serguei Patchkovskii" <patchkov@ucalgary.ca>
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 <stdio.h>
> #include <strings.h>
> #include <usersec.h>
>
> 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);
> }
> }
reply other threads:[~1998-08-25 14:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox