Fix the behavior of exportfs -r.
Check the return of chdir(srv) to prevent exporting accidentally
the current working directory when the directory specified
with option -r doesn't exist.
Also fix at the same time the missing trailing \n in error
messages printed just before exits().
|