mirror of
https://repo.or.cz/socat.git
synced 2025-07-16 16:13:24 +00:00
Restrict option umask to the address it is applied to
This commit is contained in:
parent
254958a34d
commit
e5cbf2feeb
10 changed files with 208 additions and 14 deletions
|
@ -21,7 +21,6 @@ const struct optdesc opt_unlink = { "unlink", NULL, OPT_UNLINK, G
|
|||
const struct optdesc opt_unlink_early= { "unlink-early",NULL, OPT_UNLINK_EARLY,GROUP_NAMED, PH_EARLY, TYPE_BOOL, OFUNC_SPEC };
|
||||
const struct optdesc opt_unlink_late = { "unlink-late", NULL, OPT_UNLINK_LATE, GROUP_NAMED, PH_PASTOPEN, TYPE_BOOL, OFUNC_SPEC };
|
||||
const struct optdesc opt_unlink_close = { "unlink-close", NULL, OPT_UNLINK_CLOSE, GROUP_NAMED, PH_LATE, TYPE_BOOL, OFUNC_SPEC };
|
||||
const struct optdesc opt_umask = { "umask", NULL, OPT_UMASK, GROUP_NAMED, PH_EARLY, TYPE_MODET, OFUNC_SPEC };
|
||||
#endif /* WITH_NAMED */
|
||||
|
||||
/* applies to filesystem entry all options belonging to phase */
|
||||
|
@ -71,12 +70,6 @@ int applyopts_named(const char *filename, struct opt *opts, unsigned int phase)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case OPT_UMASK:
|
||||
if (Umask(opt->value.u_modet) < 0) {
|
||||
/* linux docu says it always succeeds, but who believes it? */
|
||||
Error2("umask("F_mode"): %s", opt->value.u_modet, strerror(errno));
|
||||
}
|
||||
break;
|
||||
default: Error1("applyopts_named(): option \"%s\" not implemented",
|
||||
opt->desc->defname);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue