[clang][test] Remove an uninitialized read in a test case (#223120)
This test case was added in
https://github.com/llvm/llvm-project/pull/222212. Its purpose is to
check that explicit constructor calls work at compile time.
However, the test case left var.a uninitialized and the copy constructor
reads an unitialized value. MSVC diagnoses this, but clang currently
fails to do so.
Change the test case to remove the unrelated problem of an uninitialized
read.
fw_update: Make tar skip files outside expected locations
tar(1) strips ".." path components, but this happens after globbing is
applied to the file parameter. This meant tar's -s replacements and the
file parameter examined different strings, meaning a specially
constructed archive could write outside the expected locations. Use
tar's documented order of -s expressions to skip everything else.
NAS-142160 / 27.0.0-BETA.1 / Restrict mutation of pass-through config fields to FULL_ADMIN (#19553)
Several public API fields pass caller-supplied text straight through to
a root command line or to a privileged daemon's configuration file,
handing the caller a capability the role guarding the endpoint was never
meant to grant. `rsynctask.extra` becomes rsync flags, where `-e` names
the program rsync spawns; `ssh.options` is interpolated verbatim into
`sshd_config`; `ups.shutdowncmd` is what upsmon runs as root. Two
shipped roles reach one of these with no custom privilege configured:
`REPLICATION_ADMIN` reaches `rsynctask.extra`, and `SHARING_ADMIN`
reaches `ftp.options`.
A new `FullAdmin[...]` marker on the API model restricts mutation of
such a field to callers holding `FULL_ADMIN`. Enforcement lives in
`CRUDService.create`, `CRUDService.update` and `ConfigService.update`,
which already receive `app`, so marking the field is all a plugin has to
do. `cloudsync.list_directory` and `cloudsync.sync_onetime` do not route
through those wrappers and call the helper themselves; a unit test fails
the build if a marked field is ever left with no enforcement path.
[132 lines not shown]
[ELF] Version script: simplify wildcard matching. NFC (#223202)
Replace a loop over non-"*" wildcard patterns and another loop over "*"
with a single loop that calls the inlined
`SymbolTable::assignWildcardVersion`.
[RISCV] Consistently use RISCVSubtarget::is64Bit() instead of isRV32/isRV64. (#223038)
99% of code uses RISCVSubtarget::is64Bit().
Maybe we should consider removing is64Bit(), and using isRV64() instead
but right now I think we should be consistent.
devel/rust-cxxbridge: New port
cxxbridge generates the C++ side of the cxx bridge and is required
at build time by projects that use corrosion's
corrosion_add_cxxbridge() without network access.
devel/rust-cxxbridge: New port
cxxbridge generates the C++ side of the cxx bridge and is required
at build time by projects that use corrosion's
corrosion_add_cxxbridge() without network access.
stress2: add two new unionfs test scenarios
These exercise lookup traversal from tmpfs into unionfs, which is
useful because, unlike UFS, tmpfs does not allow recursion on its vnode
locks by default.
unionfs22.sh exercises these lookups with a normal unionfs mount, while
unionfs23.sh uses '-o below' for the unionfs mount and reproduces the
panic described in PR 298201.
Reviewed by: kib, markj, pho
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D59494
stress2: add two new unionfs test scenarios
These exercise lookup traversal from tmpfs into unionfs, which is
useful because, unlike UFS, tmpfs does not allow recursion on its vnode
locks by default.
unionfs22.sh exercises these lookups with a normal unionfs mount, while
unionfs23.sh uses '-o below' for the unionfs mount and reproduces the
panic described in PR 298201.
Reviewed by: kib, markj, pho
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D59494
vfs_lookup_cross_mount(): fix missing LK_CANRECURSE
This was a rather dumb miss on my part in commit 42442d7a6e.
LK_CANRECURSE is clearly needed in any case in which the covered vnode
is held exclusive across the call to VFS_ROOT(), regardless of whether
it was initially held exclusive or upgraded. The commit message for
that change also noted that unionfs lookup only worked without
LK_CANRECURSE due to a coincidence of the then-current unionfs
implementation. As it happens, said coincidence was recently removed
in commit b952606b4f ("unionfs_lock(): eliminate LK_CANRECURSE special-
case").
PR: 298201
Reported by: olivier
Fixes: 42442d7a6e "Generalize the VV_CROSSLOCK logic in
vfs_lookup"
Reviewed by: kib, markj, pho
Tested by: pho
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D59494
vfs_lookup_cross_mount(): fix missing LK_CANRECURSE
This was a rather dumb miss on my part in commit 42442d7a6e.
LK_CANRECURSE is clearly needed in any case in which the covered vnode
is held exclusive across the call to VFS_ROOT(), regardless of whether
it was initially held exclusive or upgraded. The commit message for
that change also noted that unionfs lookup only worked without
LK_CANRECURSE due to a coincidence of the then-current unionfs
implementation. As it happens, said coincidence was recently removed
in commit b952606b4f ("unionfs_lock(): eliminate LK_CANRECURSE special-
case").
PR: 298201
Reported by: olivier
Fixes: 42442d7a6e "Generalize the VV_CROSSLOCK logic in
vfs_lookup"
Reviewed by: kib, markj, pho
Tested by: pho
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D59494