Fix ncpserv, nwfile and nwshare warning hot spots
This commit is contained in:
@@ -193,10 +193,12 @@ int share_file(dev_t dev, ino_t inode, int open_mode, int action)
|
||||
new_str(path_share_lock_files, buff);
|
||||
else
|
||||
new_str(path_share_lock_files, "/var/spool/nwserv/.locks");
|
||||
seteuid(0);
|
||||
if (seteuid(0))
|
||||
return(-1);
|
||||
unx_xmkdir(path_share_lock_files, 0755);
|
||||
} else
|
||||
seteuid(0);
|
||||
if (seteuid(0))
|
||||
return(-1);
|
||||
l=sprintf(buff, "%s/%" PRIxMAX ".sm", path_share_lock_files,
|
||||
(uintmax_t)dev);
|
||||
sd->fd_sm = open(buff, O_RDWR|O_CREAT, 0600);
|
||||
|
||||
Reference in New Issue
Block a user