Clean up ftrustee, namspace and unxlog warning paths
This commit is contained in:
@@ -257,7 +257,7 @@ static int nwp_stat(N_NW_PATH *nwpath, char *debstr)
|
||||
int result=stat(uname, &(nwpath->statb));
|
||||
|
||||
if (result && errno == EACCES){ /* mst:14-Apr-00 */
|
||||
seteuid(0);
|
||||
if (seteuid(0)) {}
|
||||
result = stat(uname, &(nwpath->statb));
|
||||
reseteuid();
|
||||
}
|
||||
@@ -319,11 +319,11 @@ static void put_dbe_to_disk(DIR_BASE_ENTRY *dbe)
|
||||
(int) inode_uc[1],
|
||||
(int) inode_uc[2]);
|
||||
|
||||
seteuid(0);
|
||||
if (seteuid(0)) {}
|
||||
unx_xmkdir(buf, 0755);
|
||||
sprintf(buf+l, "/%x", (int) inode_uc[3]);
|
||||
unlink(buf);
|
||||
symlink(dbe->nwpath.path, buf);
|
||||
if (symlink((char*)dbe->nwpath.path, buf)) {}
|
||||
reseteuid();
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ static void del_dbe_from_disk(DIR_BASE_ENTRY *dbe)
|
||||
(int) inode_uc[1],
|
||||
(int) inode_uc[2],
|
||||
(int) inode_uc[3]);
|
||||
seteuid(0);
|
||||
if (seteuid(0)) {}
|
||||
unlink(buf);
|
||||
reseteuid();
|
||||
}
|
||||
@@ -383,7 +383,7 @@ static int get_dbe_data_from_disk(int volume,
|
||||
(int) inode_uc[2],
|
||||
(int) inode_uc[3]);
|
||||
|
||||
seteuid(0);
|
||||
if (seteuid(0)) {}
|
||||
l=readlink(buf, path, 511);
|
||||
reseteuid();
|
||||
|
||||
@@ -1536,7 +1536,7 @@ static int search_match(struct dirent *dirbuff,
|
||||
|
||||
statflag = stat(ds->unixname, &statb);
|
||||
if (statflag && errno == EACCES) { /* mst:21-Apr-00 */
|
||||
seteuid(0);
|
||||
if (seteuid(0)) {}
|
||||
statflag = stat(ds->unixname, &statb);
|
||||
reseteuid();
|
||||
}
|
||||
@@ -1641,7 +1641,7 @@ int nw_search_file_dir(int namespace, int datastream,
|
||||
DIR_SEARCH_STRUCT *ds=(DIR_SEARCH_STRUCT*) xcmalloc(sizeof(DIR_SEARCH_STRUCT));
|
||||
ds->unixname = unixname;
|
||||
if (NULL == (ds->fdir = opendir(ds->unixname)) ) {
|
||||
seteuid(0);
|
||||
if (seteuid(0)) {}
|
||||
ds->fdir=opendir(ds->unixname);
|
||||
reseteuid();
|
||||
}
|
||||
@@ -1940,7 +1940,7 @@ static int func_search_entry(DIR_BASE_ENTRY *dbe, int namespace,
|
||||
if (!tru_eff_rights_exists(dbe->nwpath.volume, ds->unixname,
|
||||
&(dbe->nwpath.statb), TRUSTEE_F)) {
|
||||
if (NULL == (ds->fdir = opendir(ds->unixname)) ) {
|
||||
seteuid(0);
|
||||
if (seteuid(0)) {}
|
||||
ds->fdir = opendir(ds->unixname);
|
||||
reseteuid();
|
||||
}
|
||||
@@ -2342,7 +2342,7 @@ static int nw_rename_file_dir(int namespace,
|
||||
result=-0x8b;
|
||||
|
||||
if (result > -1) {
|
||||
seteuid(0);
|
||||
if (seteuid(0)) {}
|
||||
if (S_ISDIR(dbe_s->nwpath.statb.st_mode))
|
||||
result = unx_mvdir(unname_s, unname_d);
|
||||
else
|
||||
@@ -2448,7 +2448,7 @@ static int nw_modify_file_dir(int namespace,
|
||||
|
||||
ut.modtime = nw_2_un_time(datetime+2, datetime);
|
||||
if (-1==utime(uname, &ut)) {
|
||||
seteuid(0);
|
||||
if (seteuid(0)) {}
|
||||
utime(uname, &ut);
|
||||
reseteuid();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user