44d26fef | 08-Jan-2025 |
Matthew Dillon <dillon@apollo.backplane.com> |
cd9660 - Fix unexpected file/dir mode mask in 7764eb663ae501
* 7764eb663ae501 used the modes of the underlying mount point as the default fmask and dmask for cd9660 mounts when no masking options
cd9660 - Fix unexpected file/dir mode mask in 7764eb663ae501
* 7764eb663ae501 used the modes of the underlying mount point as the default fmask and dmask for cd9660 mounts when no masking options are specified. This is unexpected. Prior to that commit, the modes from ISO were used verbatim.
* This commit returns to the old (more expected) operation when -m/-M is not specified.
* Also make some adjustments to ensure that new kernels work with old worlds and vise-versa. Make use of the fields require the related mount flag and also default the fields to all modes when -m/-M is not specified. Any mismatch will have the prior (expected) operation.
Reported-by: Sergey Zigachev (servik)
show more ...
|
a6741f0b | 20-Nov-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sbin/hammer2/cmd_snapshot.c: Fix error handling
pfs.name is not valid when ioctl(HAMMER2IOC_PFS_GET) failed. |
6cd7b653 | 17-Nov-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sbin/hammer2: Fix usage() |
11bfc5a1 | 21-Oct-2024 |
Aaron LI <aly@aaronly.me> |
ifconfig(8): Improve wg_aip_parse() to validate CIDR prefix length |
d4d5b6b1 | 19-Oct-2024 |
Aaron LI <aly@aaronly.me> |
ifconfig(8): Fix IPv6 CIDR parsing error for wgaip (wg allowed-ip)
The inet_net_pton() is inherited from legacy ISC named code and uses a legacy IPv6 CIDR format (e.g., 1:2:3:4/64), so it fails to p
ifconfig(8): Fix IPv6 CIDR parsing error for wgaip (wg allowed-ip)
The inet_net_pton() is inherited from legacy ISC named code and uses a legacy IPv6 CIDR format (e.g., 1:2:3:4/64), so it fails to parse some now valid IPv6 CIDRs (e.g., 1:2:3:4::/64). This was causing 'wgaip' option to fail configure some IPv6 allowed-ips/networks.
Given that inet_net_pton() is not standard and behaves differently across BSDs and Linux, it might be not really useful to fix/improve it (e.g., by porting OpenBSD's version). Instead, I chose to write wg_aip_parse() to manually parse the CIDRs.
Reported-by: Michael Neumann (mneumann) on IRC
show more ...
|
e436662c | 15-Oct-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sbin/fsck_hammer2: Fix destination FILE* in print_media()
Also show comp/check in string format. |
152bbef5 | 14-Oct-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sbin/fsck_hammer2: Remove unused voldata argument |
167a410d | 10-Oct-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sbin/hammer2/cmd_debug.c: Refactor unreadable cmd_show()
0b7381572b131c74051832dc251604e7f77b5a54 added multi-volumes support to cmd_show() (entry point of freemap,show,volhdr directives) with minim
sbin/hammer2/cmd_debug.c: Refactor unreadable cmd_show()
0b7381572b131c74051832dc251604e7f77b5a54 added multi-volumes support to cmd_show() (entry point of freemap,show,volhdr directives) with minimum modification using goto, but the code has been not so readable since then. Rewrite this entry point function.
The output is same except that "Volume %d header %d..." by default (= when not showing volhdr or bref for all volumes) appears before printing each volhdr or bref, rather than all at once in the beginning.
show more ...
|
b87d88f0 | 05-Oct-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sbin/hammer2/cmd_debug.c: Clear errno
otherwise affects next strtol(3) variant when no error.
strtol(3) says "If no conversion could be performed, 0 is returned and the global variable errno is set
sbin/hammer2/cmd_debug.c: Clear errno
otherwise affects next strtol(3) variant when no error.
strtol(3) says "If no conversion could be performed, 0 is returned and the global variable errno is set to EINVAL".
show more ...
|
2c8c691b | 01-Oct-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sys/vfs/hammer2: Change hammer2_inode_meta::target_type to unused84
No longer used or needed since da0cdd33148ab3e3c227355de759c595c533841a in 2017.
target_type was only used for the initial hardli
sys/vfs/hammer2: Change hammer2_inode_meta::target_type to unused84
No longer used or needed since da0cdd33148ab3e3c227355de759c595c533841a in 2017.
target_type was only used for the initial hardlink design and implementation, which is not how it works today.
show more ...
|
c825a6c5 | 24-Sep-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sbin/hammer2: Verify fstype UUID in hammer2_verify_volumes_common()
Its string form has to be HAMMER2_UUID_STRING. Also move common volu_id check to hammer2_verify_volumes_common(). |
1a0f56e1 | 24-Sep-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sbin/hammer2/cmd_debug.c: Print volume id in "Volume header" message |
8fbce03d | 24-Sep-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sbin/hammer2/cmd_debug.c: Don't use both XB and XiB in printf
These are the only ones print XiB with "XiB" in HAMMER2 commands. |
8d1faa37 | 20-Sep-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sbin/newfs_hammer2: Fail if input size is < alignment size
If aligned size becomes 0, it should fail with an error message before hammer2_install_volume(). e.g. If a regular file av[0] is 4MiB, size
sbin/newfs_hammer2: Fail if input size is < alignment size
If aligned size becomes 0, it should fail with an error message before hammer2_install_volume(). e.g. If a regular file av[0] is 4MiB, size becomes 0 after aligned.
Also add same sanity in hammer2_verify_volumes_common(). vol->size == 0 passes 8MiB or 1GiB alignment sanity.
show more ...
|
94803e43 | 20-Sep-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sbin/newfs_hammer2: Remove redundant inode.meta.name_xxx zero clears
Remove obsolete code from b33a7e92438b9c9fc915e7c432666385051369db in 2012.
suproot has a name "SUPROOT" in inode itself if not
sbin/newfs_hammer2: Remove redundant inode.meta.name_xxx zero clears
Remove obsolete code from b33a7e92438b9c9fc915e7c432666385051369db in 2012.
suproot has a name "SUPROOT" in inode itself if not in dirent, and name_len is initialized with a proper length right after this.
show more ...
|
7485684f | 03-Mar-2024 |
Aaron LI <aly@aaronly.me> |
Whitespace cleanups |
cfb5793b | 23-Mar-2024 |
Aaron LI <aly@aaronly.me> |
mount_cd9660(8): Simplify and clean up set_charset()
Simplify set_charset(), partly according to mount_ntfs(8).
Meanwhile, clean up the whitespace styles. |
7764eb66 | 08-Mar-2024 |
Ricardo Branco <rbranco@suse.de> |
cd9660: Add support for mask,dirmask,uid,gid options
The updates to mount_cd9660(8) are basically taken from mount_msdos(8).
GitHub PR: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/23 See also
cd9660: Add support for mask,dirmask,uid,gid options
The updates to mount_cd9660(8) are basically taken from mount_msdos(8).
GitHub PR: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/23 See also: - https://github.com/freebsd/freebsd-src/pull/982 - https://github.com/NetBSD/src/pull/29
show more ...
|
ce0bf054 | 10-Mar-2024 |
Ricardo Branco <rbranco@suse.de> |
umount(8): Add -d option to detach vn(4) devices
The '-d' option tells umount(8) to detach the underlying vn(4) device if the filesystem was mounted from it. Note that vn(4) is a virtual disk and c
umount(8): Add -d option to detach vn(4) devices
The '-d' option tells umount(8) to detach the underlying vn(4) device if the filesystem was mounted from it. Note that vn(4) is a virtual disk and can provides multiple filesystems, so the vn(4) detaching can only succeed when all the filesystems are umounted.
For example: $ vnconfig -c vn dfly.img vn4 $ mount_msdos /dev/vn4s1 /mnt/dfly/boot $ mount_ufs /dev/vn4s2a /mnt/dfly/root $ umount -d /mnt/dfly/boot umount: VNIOCDETACH: /dev/vn4: Device busy umount: detach of /dev/vn4s1 failed $ umount -d /mnt/dfly/root (now vn4 is detached)
A similar option exists in Linux's and FreeBSD's umount(8).
GitHub PR: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/24 See Also: https://github.com/freebsd/freebsd-src/pull/972
show more ...
|
88816642 | 05-Mar-2024 |
Aaron LI <aly@aaronly.me> |
md5(1): Further cleanup the code a bit
No functional changes. |
2d52e8a3 | 05-Mar-2024 |
Aaron LI <aly@aaronly.me> |
md5(1): Improve the previous commit
Improve digestbig() to further check for read() errors and return NULL in that case.
Add a comment to explain why can't use file size (st_size). |
79549f81 | 03-Mar-2024 |
Ricardo Branco <rbranco@suse.de> |
md5(1): Fix to calculate correct checksum on pseudo filesystems
The file size (st_size) on pseudo filesystems can be zero and meaningless, so ignore it and read until EOF to get the whole contents.
md5(1): Fix to calculate correct checksum on pseudo filesystems
The file size (st_size) on pseudo filesystems can be zero and meaningless, so ignore it and read until EOF to get the whole contents. Now md5(1) is able to calculate the correct checksums for files on pseudo filesystems, like /proc.
show more ...
|
1219dc1d | 05-Mar-2024 |
Aaron LI <aly@aaronly.me> |
md5(1): Minor code tweaks and style cleanups
No functional changes. |
a1d2059d | 04-Mar-2024 |
Aaron LI <aly@aaronly.me> |
ping(8): Add check for negative wait timeout
Meanwhile, fix the error message. |
881f0bf6 | 04-Mar-2024 |
Aaron LI <aly@aaronly.me> |
ping(8): Relax the interval restriction for normal users
The ping interval was restricted to be >= 1 second for normal users to prevent from performing DoS attacks. This restriction was added by Ma
ping(8): Relax the interval restriction for normal users
The ping interval was restricted to be >= 1 second for normal users to prevent from performing DoS attacks. This restriction was added by Matt Dillon in 1998 during the BEST days [0]. It has become less meaningful now. Following the Linux behavior, relax the interval to be >= 2 milliseconds for normal users.
In addition, add a check for negative interval numbers.
[0] https://github.com/freebsd/freebsd-src/commit/526f06b278d9252add168aa18b60242c08771165
Discussed-with: dillon
show more ...
|