Use write results and fix queue/dbm/trustee warning leftovers

This commit is contained in:
Mario Fetka
2026-04-20 23:39:42 +02:00
parent fd9daeb22f
commit 00883ff8be
5 changed files with 38 additions and 38 deletions

View File

@@ -2001,7 +2001,7 @@ static uint8 *test_add_dir(uint8 *unixname, uint8 *pp, int flags,
else {
chmod(unixname, permiss);
if (uid >-1 && gid > -1)
(void)chown(unixname, uid, gid);
if (chown(unixname, uid, gid)) {}
XDPRINTF((1, 0, "Created dir '%s'", unixname));
}
} else {
@@ -2018,7 +2018,7 @@ static uint8 *test_add_dir(uint8 *unixname, uint8 *pp, int flags,
if (flags&2) {
chmod(unixname, permiss);
if (uid >-1 && gid > -1)
(void)chown(unixname, uid, gid);
if (chown(unixname, uid, gid)) {}
}
}
if (flags&1) {
@@ -2060,7 +2060,7 @@ static void correct_user_dirs(uint32 objid, uint8 *objname, int uid, int gid)
(void)mkdir(fndir, mask);
(void)chmod(fndir, mask);
(void)chown(fndir, uid, gid);
if (chown(fndir, uid, gid)) {}
if ((f=opendir(fndir)) != (DIR*)NULL) {
struct dirent* dirbuff;
@@ -2075,7 +2075,7 @@ static void correct_user_dirs(uint32 objid, uint8 *objname, int uid, int gid)
if (f) {
fprintf(f, "REM auto created by mars_nwe\r\n");
fclose(f);
(void)chown(fndir, uid, gid);
if (chown(fndir, uid, gid)) {}
chmod(fndir, 0600);
}
}
@@ -2091,7 +2091,7 @@ static void correct_user_dirs(uint32 objid, uint8 *objname, int uid, int gid)
&& !S_ISLNK(lstatb.st_mode) &&
lstatb.st_uid != 0 && lstatb.st_gid != 0
&& lstatb.st_uid != uid) {
(void)chown(fndir, uid, gid);
if (chown(fndir, uid, gid)) {}
if (sys_has_trustee) {
chmod(fndir, S_ISDIR(lstatb.st_mode) ? 700 : 600);
}
@@ -2108,7 +2108,7 @@ static void correct_user_dirs(uint32 objid, uint8 *objname, int uid, int gid)
else
downstr(p1+5);
unlink(fndir);
(void)symlink(buf1, fndir);
if (symlink(buf1, fndir)) {}
}
void test_ins_unx_user(uint32 id)
@@ -3050,7 +3050,7 @@ static void bcreate_obj(uint32 id, char *name, int type,
/* 1/mstover -> ../id/1/2/3/4 */
slprintf(buf1,sizeof(buf1)-1, "../id/%s", id_buf);
(void)symlink(buf1, buf);
if (symlink(buf1, buf)) {}
/* id/1/2/3/4 creat */
len = slprintf(buf, sizeof(buf)-2,"%s/id/%s", path_bindery, id_buf);
@@ -3063,17 +3063,17 @@ static void bcreate_obj(uint32 id, char *name, int type,
strmaxcpy(buf+len, "name.o", sizeof(buf)-1-len);
strmaxcpy(buf1, name, sizeof(buf1)-1);
downstr(buf1);
(void)symlink(buf1, buf);
if (symlink(buf1, buf)) {}
/* typ -> 1 */
strmaxcpy(buf+len, "typ.o", sizeof(buf)-1-len);
slprintf(buf1, sizeof(buf1)-1,"%x", type);
(void)symlink(buf1, buf);
if (symlink(buf1, buf)) {}
/* flags & security */
strmaxcpy(buf+len, "f+s.o", sizeof(buf)-1-len);
slprintf(buf1, sizeof(buf1)-1,"%02x%02x", flags&0xff, security&0xff);
(void)symlink(buf1, buf);
if (symlink(buf1, buf)) {}
}
@@ -3118,7 +3118,7 @@ static void bcreate_prop(uint32 id, int prop_id, char *name,
/* id.p -> name */
slprintf(buf1,sizeof(buf1)-1, "%s", name);
downstr(buf1);
(void)symlink(buf1, buf);
if (symlink(buf1, buf)) {}
/* x/name creat */
@@ -3132,7 +3132,7 @@ static void bcreate_prop(uint32 id, int prop_id, char *name,
/* flags & security */
strmaxcpy(buf+len, "f+s", sizeof(buf)-1-len);
slprintf(buf1, sizeof(buf1)-1,"%02x%02x", propflags&0xff, propsecurity&0xff);
(void)symlink(buf1, buf);
if (symlink(buf1, buf)) {}
}
@@ -3181,7 +3181,7 @@ static void bcreate_val(uint32 id, int prop_id, int segment,
sprintf(p1, "%02x", (int) *p++);
p1+=2;
}
(void)symlink(buf1, buf);
if (symlink(buf1, buf)) {}
}