Mercurial > dropbear
comparison scpmisc.c @ 1400:238a439670f5 coverity
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 03 Jun 2017 00:10:58 +0800 |
parents | e7f11ed5fe28 |
children | 9579377b5f8b |
comparison
equal
deleted
inserted
replaced
1344:b90da477ab63 | 1400:238a439670f5 |
---|---|
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 */ |