libshare: nfs: set export file 644

The shares are publicly known anyway and can be interrogated by any
user, so this is a debugging aid more than anything.

Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12067
This commit is contained in:
наб 2021-05-17 21:08:16 +02:00 committed by Brian Behlendorf
parent 9d4a44f0b8
commit 1e78b4eee0
1 changed files with 1 additions and 0 deletions

View File

@ -144,6 +144,7 @@ nfs_fini_tmpfile(const char *exports, struct tmpfile *tmpf)
return (SA_SYSTEM_ERR);
}
(void) fchmod(fileno(tmpf->fp), 0644);
fclose(tmpf->fp);
return (SA_OK);
}