Hi,
On Sat, Jun 13, 2015 at 09:41:58PM -0700, Philip Guenther wrote:
> On Thu, 4 Jun 2015, patrick keshishian wrote:
> > With the cp(1) change to use chflagsat(), systrace needs to be taught
> > about chflagsat syscall. databases/db/v4 port fails with
> > USE_SYSTRACE=Yes due to a "$(CP) -pr" use during install_docs.
> >
> > Could someone look over these changes and correct any mistakes. I am not
> > 100% sure it is correct; specifically, I'm not sure about the
> > print_atflags.
>
> Hmm, the other *at calls don't seem to do special handling for the
> atflags. As a first pass, perhaps the chflagsat support should do the
> same, with support for atflag matching as a second pass?
>
> If that's sane, then I think the diff, modelling on the existing fchmodat
> support, just becomes this, no?
I trust your judgement. Thanks for looking into this.
--patrick
p.s., Sorry for the late reply; I've had limit time with email.
> Philip Guenther
>
> Index: register.c
> ===================================================================
> RCS file: /data/src/openbsd/src/bin/systrace/register.c,v
> retrieving revision 1.25
> diff -u -p -r1.25 register.c
> --- register.c 16 Jan 2015 00:19:12 -0000 1.25
> +++ register.c 8 Jun 2015 08:44:16 -0000
> @@ -258,6 +258,11 @@ systrace_initcb(void)
> alias = systrace_new_alias("native", "fstatat", "native", "fsread");
> systrace_alias_add_trans(alias, tl);
>
> + X(intercept_register_sccb("native", "chflagsat", trans_cb, NULL));
> + intercept_register_translation("native", "chflagsat", 1,
> + &ic_translate_filenameatflag);
> + intercept_register_translation("native", "chflagsat", 2, &ic_fileflags);
> +
> X(intercept_register_sccb("native", "linkat", trans_cb, NULL));
> intercept_register_translation("native", "linkat", 1,
> &ic_translate_unlinknameatflag);
>