tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Follow-up to:C program to mount/umount disks
@ 1998-08-25 14:49 richard n. frank
  0 siblings, 0 replies; only message in thread
From: richard n. frank @ 1998-08-25 14:49 UTC (permalink / raw)
  To: tru64-unix-managers


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);
>   }
> }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-08-25 14:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-08-25 14:49 Follow-up to:C program to mount/umount disks richard n. frank

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox