lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210211153024.32502-4-s.hauer@pengutronix.de>
Date:   Thu, 11 Feb 2021 16:30:24 +0100
From:   Sascha Hauer <s.hauer@...gutronix.de>
To:     linux-fsdevel@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org,
        Christoph Hellwig <hch@...radead.org>, kernel@...gutronix.de,
        Jan Kara <jack@...e.com>, Richard Weinberger <richard@....at>,
        Sascha Hauer <s.hauer@...gutronix.de>
Subject: [PATCH] quotactl.2: Add documentation for quotactl_path()

Expand the quotactl.2 manpage with a description for quotactl_path()
that takes a mountpoint path instead of a path to a block device.

Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>
---
 man2/quotactl.2      | 31 ++++++++++++++++++++++++++++---
 man2/quotactl_path.2 |  1 +
 2 files changed, 29 insertions(+), 3 deletions(-)
 create mode 100644 man2/quotactl_path.2

diff --git a/man2/quotactl.2 b/man2/quotactl.2
index 7869c64ea..76505c668 100644
--- a/man2/quotactl.2
+++ b/man2/quotactl.2
@@ -34,6 +34,8 @@ quotactl \- manipulate disk quotas
 .PP
 .BI "int quotactl(int " cmd ", const char *" special ", int " id \
 ", caddr_t " addr );
+.BI "int quotactl_path(int " cmd ", const char *" mountpoint ", int " id \
+", caddr_t " addr );
 .fi
 .SH DESCRIPTION
 The quota system can be used to set per-user, per-group, and per-project limits
@@ -48,7 +50,11 @@ after this, the soft limit counts as a hard limit.
 .PP
 The
 .BR quotactl ()
-call manipulates disk quotas.
+and
+.BR quotactl_path ()
+calls manipulate disk quotas. The difference between both functions is the way
+how the filesystem being manipulated is specified, see description of the arguments
+below.
 The
 .I cmd
 argument indicates a command to be applied to the user or
@@ -75,10 +81,19 @@ value is described below.
 .PP
 The
 .I special
-argument is a pointer to a null-terminated string containing the pathname
+argument to
+.BR quotactl ()
+is a pointer to a null-terminated string containing the pathname
 of the (mounted) block special device for the filesystem being manipulated.
 .PP
 The
+.I mountpoint
+argument to
+.BR quotactl_path ()
+is a pointer to a null-terminated string containing the pathname
+of the mountpoint for the filesystem being manipulated.
+.PP
+The
 .I addr
 argument is the address of an optional, command-specific, data structure
 that is copied in or out of the system.
@@ -133,7 +148,17 @@ flag in the
 .I dqi_flags
 field returned by the
 .B Q_GETINFO
-operation.
+operation. The
+.BR quotactl_path ()
+variant of this syscall generally ignores the
+.IR addr
+and
+.IR id
+arguments, so the
+.B Q_QUOTAON
+operation of
+.BR quotactl_path ()
+is only suitable for work with hidden system inodes.
 .IP
 This operation requires privilege
 .RB ( CAP_SYS_ADMIN ).
diff --git a/man2/quotactl_path.2 b/man2/quotactl_path.2
new file mode 100644
index 000000000..5f63187c6
--- /dev/null
+++ b/man2/quotactl_path.2
@@ -0,0 +1 @@
+.so man2/quotactl.2
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ