If the mmap() call in rpc.statd fails, rpc.statd prints a warning
message and then dumps core because the subsequent code assumes that mmap() succeeded. Since rpc.statd does not have fallback code to implement the functionality needed to operate on the status file if it is not memory mapped, rpc.statd should use err() to force the process to exit if the mmap() call fails. PR: bin/115430 (mmap() failure previously fixed in statd.c 1.15) Approved by: re (kensmith) MFC after: 1 week
This commit is contained in:
parent
12e4d46cdb
commit
098935f8d5
@ -159,7 +159,7 @@ void init_file(const char *filename)
|
||||
mmap(NULL, 0x10000000, PROT_READ | PROT_WRITE, MAP_SHARED, status_fd, 0);
|
||||
|
||||
if (status_info == (FileLayout *) MAP_FAILED)
|
||||
warn("unable to mmap() status file");
|
||||
err(1, "unable to mmap() status file");
|
||||
|
||||
status_file_len = lseek(status_fd, 0L, SEEK_END);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user