Download raw body.
Generated microcode objects should be group writeable by group wobj - see WOBJUMASK in bsd.obj.mk
Generated microcode objects should be group writeable by group wobj - see WOBJUMASK in bsd.ob
Why are you using a different user?
Christian Schulte <cs@schulte.it> wrote:
> The FAQ at <http://www.openbsd.org/faq/faq5.html> mentions in section
> "Miscellaneous Questions and Tips":
>
> "If you intend to compile individual programs in the source tree -- for
> example, to do development -- you'll want to add your user to the wobj group.
> This will allow you to write to /usr/obj."
>
> When generating microcode objects during make build, those objects will be
> created without write permission of group wobj so that builds run as a different
> user than build but in group wobj will fail due to permission denied errors.
> The following diff will change those microcode generation programs to use
> file mode 0664 instead of 0644 so that those objects will be group writeable
> by group wobj after make build.
>
>
> Index: sys/dev/microcode/afb/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/afb/build.c,v
> retrieving revision 1.1
> diff -u -p -u -r1.1 build.c
> --- sys/dev/microcode/afb/build.c 7 Dec 2009 20:35:25 -0000 1.1
> +++ sys/dev/microcode/afb/build.c 28 Sep 2024 13:11:58 -0000
> @@ -34,7 +34,7 @@ main(int argc, char *argv[])
> int fd;
> int i;
>
> - fd = open(AFB_FW_NAME, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> + fd = open(AFB_FW_NAME, O_WRONLY | O_CREAT | O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", AFB_FW_NAME);
>
> Index: sys/dev/microcode/atmel/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/atmel/build.c,v
> retrieving revision 1.9
> diff -u -p -u -r1.9 build.c
> --- sys/dev/microcode/atmel/build.c 17 May 2005 18:48:51 -0000 1.9
> +++ sys/dev/microcode/atmel/build.c 28 Sep 2024 13:11:58 -0000
> @@ -37,7 +37,7 @@ output(const char *name, char *buf, int
> int fd;
>
> printf("creating %s length %d\n", name, buflen);
> - fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0644);
> + fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", name);
>
> Index: sys/dev/microcode/bnx/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/bnx/build.c,v
> retrieving revision 1.9
> diff -u -p -u -r1.9 build.c
> --- sys/dev/microcode/bnx/build.c 27 Aug 2017 08:15:48 -0000 1.9
> +++ sys/dev/microcode/bnx/build.c 28 Sep 2024 13:11:58 -0000
> @@ -125,7 +125,7 @@ write_firmware(char *filename, void *hea
> ssize_t rlen;
>
> printf("creating %s", filename);
> - fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644);
> + fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", filename);
>
> Index: sys/dev/microcode/bwi/build/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/bwi/build/build.c,v
> retrieving revision 1.4
> diff -u -p -u -r1.4 build.c
> --- sys/dev/microcode/bwi/build/build.c 20 Jul 2014 02:03:21 -0000 1.4
> +++ sys/dev/microcode/bwi/build/build.c 28 Sep 2024 13:11:58 -0000
> @@ -93,7 +93,7 @@ main(int argc, char *argv[])
> }
>
> /* open output file */
> - if ((fdout = open(FILENAME, O_CREAT|O_TRUNC|O_RDWR, 0644)) == -1)
> + if ((fdout = open(FILENAME, O_CREAT|O_TRUNC|O_RDWR, 0664)) == -1)
> err(1, "open output file failed");
>
> /* host to network byte order */
> Index: sys/dev/microcode/bwi/extract/extract.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/bwi/extract/extract.c,v
> retrieving revision 1.4
> diff -u -p -u -r1.4 extract.c
> --- sys/dev/microcode/bwi/extract/extract.c 24 Sep 2014 00:13:13 -0000 1.4
> +++ sys/dev/microcode/bwi/extract/extract.c 28 Sep 2024 13:11:58 -0000
> @@ -74,7 +74,7 @@ main(int argc, char *argv[])
>
> /* write each file */
> for (i = 0; i < nfiles; i++) {
> - if ((fdout = open(h[i]->filename, O_CREAT|O_TRUNC|O_RDWR, 0644))
> + if ((fdout = open(h[i]->filename, O_CREAT|O_TRUNC|O_RDWR, 0664))
> == -1)
> err(1, "open of output file failed");
> if ((p = malloc(h[i]->filesize)) == NULL)
> Index: sys/dev/microcode/cirruslogic/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/cirruslogic/build.c,v
> retrieving revision 1.3
> diff -u -p -u -r1.3 build.c
> --- sys/dev/microcode/cirruslogic/build.c 18 Dec 2016 18:28:39 -0000 1.3
> +++ sys/dev/microcode/cirruslogic/build.c 28 Sep 2024 13:11:58 -0000
> @@ -31,7 +31,7 @@ main(int argc, char *argv[])
> int fd;
>
> printf("creating %s length %zu\n", FILENAME, sizeof BA1Struct);
> - fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
> + fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", FILENAME);
>
> Index: sys/dev/microcode/fxp/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/fxp/build.c,v
> retrieving revision 1.4
> diff -u -p -u -r1.4 build.c
> --- sys/dev/microcode/fxp/build.c 18 Dec 2016 18:28:39 -0000 1.4
> +++ sys/dev/microcode/fxp/build.c 28 Sep 2024 13:11:58 -0000
> @@ -46,7 +46,7 @@ output(const char *name, const u_int32_t
>
> printf("creating %s length %d (microcode: %zu DWORDS)\n",
> name, ucode_len, ucode_len / sizeof(u_int32_t));
> - fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0644);
> + fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", name);
> for (i = 0; i < ucode_len / sizeof(u_int32_t); i++) {
> Index: sys/dev/microcode/kue/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/kue/build.c,v
> retrieving revision 1.8
> diff -u -p -u -r1.8 build.c
> --- sys/dev/microcode/kue/build.c 28 Aug 2017 05:46:44 -0000 1.8
> +++ sys/dev/microcode/kue/build.c 28 Sep 2024 13:11:58 -0000
> @@ -56,7 +56,7 @@ main(int argc, char *argv[])
> printf("creating %s length %d [%zu+%zu+%zu]\n",
> FILENAME, len, sizeof(kue_code_seg), sizeof(kue_fix_seg),
> sizeof(kue_trig_seg));
> - fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
> + fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0664);
> if (fd == -1)
> err(1, FILENAME);
>
> Index: sys/dev/microcode/neomagic/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/neomagic/build.c,v
> retrieving revision 1.3
> diff -u -p -u -r1.3 build.c
> --- sys/dev/microcode/neomagic/build.c 31 Jul 2020 14:58:53 -0000 1.3
> +++ sys/dev/microcode/neomagic/build.c 28 Sep 2024 13:11:58 -0000
> @@ -34,7 +34,7 @@ main(int argc, char *argv[])
> struct neo_firmware nf;
> int fd;
>
> - fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
> + fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0664);
> if (fd == -1)
> err(1, FILENAME);
>
> Index: sys/dev/microcode/ral/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/ral/build.c,v
> retrieving revision 1.5
> diff -u -p -u -r1.5 build.c
> --- sys/dev/microcode/ral/build.c 2 Oct 2018 02:05:34 -0000 1.5
> +++ sys/dev/microcode/ral/build.c 28 Sep 2024 13:11:58 -0000
> @@ -34,7 +34,7 @@ output(const char *name, const uint8_t *
>
> printf("creating %s length %d\n", name, size);
>
> - fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> + fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", name);
>
> Index: sys/dev/microcode/rsu/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/rsu/build.c,v
> retrieving revision 1.1
> diff -u -p -u -r1.1 build.c
> --- sys/dev/microcode/rsu/build.c 4 Oct 2021 01:33:42 -0000 1.1
> +++ sys/dev/microcode/rsu/build.c 28 Sep 2024 13:11:58 -0000
> @@ -34,7 +34,7 @@ output(const char *name, const uint8_t *
>
> printf("creating %s length %d\n", name, size);
>
> - fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> + fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", name);
>
> Index: sys/dev/microcode/rtwn/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/rtwn/build.c,v
> retrieving revision 1.1
> diff -u -p -u -r1.1 build.c
> --- sys/dev/microcode/rtwn/build.c 4 Oct 2021 01:33:42 -0000 1.1
> +++ sys/dev/microcode/rtwn/build.c 28 Sep 2024 13:11:58 -0000
> @@ -34,7 +34,7 @@ output(const char *name, const uint8_t *
>
> printf("creating %s length %d\n", name, size);
>
> - fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> + fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", name);
>
> Index: sys/dev/microcode/rum/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/rum/build.c,v
> retrieving revision 1.3
> diff -u -p -u -r1.3 build.c
> --- sys/dev/microcode/rum/build.c 15 May 2009 15:53:55 -0000 1.3
> +++ sys/dev/microcode/rum/build.c 28 Sep 2024 13:11:58 -0000
> @@ -34,7 +34,7 @@ output(const char *name, const uint8_t *
>
> printf("creating %s length %d\n", name, size);
>
> - fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> + fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", name);
>
> Index: sys/dev/microcode/tht/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/tht/build.c,v
> retrieving revision 1.2
> diff -u -p -u -r1.2 build.c
> --- sys/dev/microcode/tht/build.c 19 Apr 2007 04:08:51 -0000 1.2
> +++ sys/dev/microcode/tht/build.c 28 Sep 2024 13:11:58 -0000
> @@ -34,7 +34,7 @@ main(int argc, char *argv[])
> int fd;
> int i;
>
> - fd = open(THT_FW_NAME, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> + fd = open(THT_FW_NAME, O_WRONLY | O_CREAT | O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", THT_FW_NAME);
>
> Index: sys/dev/microcode/tigon/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/tigon/build.c,v
> retrieving revision 1.8
> diff -u -p -u -r1.8 build.c
> --- sys/dev/microcode/tigon/build.c 12 Jul 2014 19:01:50 -0000 1.8
> +++ sys/dev/microcode/tigon/build.c 28 Sep 2024 13:11:58 -0000
> @@ -86,7 +86,7 @@ output(const char *name,
> printf("creating %s length %d [%d+%d+%d] [%d+%d+%d]\n",
> name, len, FwTextLen, FwRodataLen, FwDataLen,
> sizetext, sizerodata, sizedata);
> - fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0644);
> + fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", name);
>
> Index: sys/dev/microcode/tusb3410/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/tusb3410/build.c,v
> retrieving revision 1.6
> diff -u -p -u -r1.6 build.c
> --- sys/dev/microcode/tusb3410/build.c 8 Sep 2017 05:36:52 -0000 1.6
> +++ sys/dev/microcode/tusb3410/build.c 28 Sep 2024 13:11:58 -0000
> @@ -32,7 +32,7 @@ main(int argc, char *argv[])
> int fd;
>
> printf("creating %s length %zu\n", FILENAME, sizeof uticom_fw_3410);
> - fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
> + fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", FILENAME);
>
> Index: sys/dev/microcode/typhoon/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/typhoon/build.c,v
> retrieving revision 1.3
> diff -u -p -u -r1.3 build.c
> --- sys/dev/microcode/typhoon/build.c 18 Dec 2016 18:28:39 -0000 1.3
> +++ sys/dev/microcode/typhoon/build.c 28 Sep 2024 13:11:58 -0000
> @@ -43,7 +43,7 @@ main(int argc, char *argv[])
> ssize_t rlen;
>
> printf("creating %s length %zu\n", FILENAME, sizeof tc990image);
> - fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
> + fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", FILENAME);
>
> Index: sys/dev/microcode/urtwn/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/urtwn/build.c,v
> retrieving revision 1.2
> diff -u -p -u -r1.2 build.c
> --- sys/dev/microcode/urtwn/build.c 28 Apr 2023 01:24:14 -0000 1.2
> +++ sys/dev/microcode/urtwn/build.c 28 Sep 2024 13:11:58 -0000
> @@ -34,7 +34,7 @@ output(const char *name, const uint8_t *
>
> printf("creating %s length %d\n", name, size);
>
> - fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> + fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", name);
>
> Index: sys/dev/microcode/yds/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/yds/build.c,v
> retrieving revision 1.8
> diff -u -p -u -r1.8 build.c
> --- sys/dev/microcode/yds/build.c 28 Aug 2017 05:46:44 -0000 1.8
> +++ sys/dev/microcode/yds/build.c 28 Sep 2024 13:11:58 -0000
> @@ -72,7 +72,7 @@ main(int argc, char *argv[])
> printf("creating %s length %d [%zu+%zu+%zu]\n",
> FILENAME, len, sizeof(yds_dsp_mcode),
> sizeof(yds_ds1_ctrl_mcode), sizeof(yds_ds1e_ctrl_mcode));
> - fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
> + fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0664);
> if (fd == -1)
> err(1, FILENAME);
>
> Index: sys/dev/microcode/zydas/build.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/microcode/zydas/build.c,v
> retrieving revision 1.2
> diff -u -p -u -r1.2 build.c
> --- sys/dev/microcode/zydas/build.c 13 Nov 2006 02:52:46 -0000 1.2
> +++ sys/dev/microcode/zydas/build.c 28 Sep 2024 13:11:58 -0000
> @@ -34,7 +34,7 @@ output(const char *name, const uint8_t *
>
> printf("creating %s length %d\n", name, size);
>
> - fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> + fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0664);
> if (fd == -1)
> err(1, "%s", name);
>
>
Generated microcode objects should be group writeable by group wobj - see WOBJUMASK in bsd.obj.mk
Generated microcode objects should be group writeable by group wobj - see WOBJUMASK in bsd.ob