#include <stdlib.h>#include <unistd.h>#include <string.h>#include <sys/types.h>#include <stdio.h>#include <fcntl.h>intmain(intargc,char**argv,char**envp){charbuf[1024];intfd,rc;if(argc==1){printf("%s [file to read]\n",argv[0]);exit(EXIT_FAILURE);}if(strstr(argv[1],"token")!=NULL){printf("You may not access '%s'\n",argv[1]);exit(EXIT_FAILURE);}fd=open(argv[1],O_RDONLY);if(fd==-1){err(EXIT_FAILURE,"Unable to open %s",argv[1]);}rc=read(fd,buf,sizeof(buf));if(rc==-1){err(EXIT_FAILURE,"Unable to read fd %d",fd);}write(1,buf,rc);}