comparison scpmisc.c @ 1411:798854f62430 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Wed, 14 Jun 2017 23:31:42 +0800
parents e7f11ed5fe28
children 9579377b5f8b
comparison
equal deleted inserted replaced
1408:27e65d3aed5f 1411:798854f62430
233 void 233 void
234 sanitise_stdfd(void) 234 sanitise_stdfd(void)
235 { 235 {
236 int nullfd, dupfd; 236 int nullfd, dupfd;
237 237
238 if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) { 238 if ((nullfd = dupfd = open(DROPBEAR_PATH_DEVNULL, O_RDWR)) == -1) {
239 fprintf(stderr, "Couldn't open /dev/null: %s", strerror(errno)); 239 fprintf(stderr, "Couldn't open /dev/null: %s", strerror(errno));
240 exit(1); 240 exit(1);
241 } 241 }
242 while (++dupfd <= 2) { 242 while (++dupfd <= 2) {
243 /* Only clobber closed fds */ 243 /* Only clobber closed fds */