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: <13226.1277556884@jrobl>
Date:	Sat, 26 Jun 2010 21:54:44 +0900
From:	"J. R. Okajima" <hooanon05@...oo.co.jp>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Nick Piggin <npiggin@...e.de>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, Al Viro <viro@...IV.linux.org.uk>,
	Ulrich Drepper <drepper@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [rfc] new stat*fs-like syscall?


Christoph Hellwig:
> That's really job for a pathconf system call that allows quering random
> paramters.

Do you mean it should be implemented such like this?
vfs_pathconf(struct dentry, int parm)
--> return d_sb->s_op->pathconf(parm)

I am afraid it is overdesign because the actual parameter(for FS) is
_PC_LINK_MAX only. All other params are already handled by VFS, glibc or
sb->statfs.


J. R. Okajima

(pathconf(3) parameters from the manual)
       _PC_LINK_MAX
              returns  the  maximum number of links to the file.  If fd or path refer to a direc-
              tory, then the value applies to the whole directory.  The  corresponding  macro  is
              _POSIX_LINK_MAX.

       _PC_MAX_CANON
              returns  the  maximum length of a formatted input line, where fd or path must refer
              to a terminal.  The corresponding macro is _POSIX_MAX_CANON.

       _PC_MAX_INPUT
              returns the maximum length of an input line, where fd or path must refer to a  ter-
              minal.  The corresponding macro is _POSIX_MAX_INPUT.

       _PC_NAME_MAX
              returns  the maximum length of a filename in the directory path or fd that the pro-
              cess is allowed to create.  The corresponding macro is _POSIX_NAME_MAX.

       _PC_PATH_MAX
              returns the maximum length of a relative pathname when path or fd  is  the  current
              working directory.  The corresponding macro is _POSIX_PATH_MAX.

       _PC_PIPE_BUF
              returns the size of the pipe buffer, where fd must refer to a pipe or FIFO and path
              must refer to a FIFO.  The corresponding macro is _POSIX_PIPE_BUF.

       _PC_CHOWN_RESTRICTED
              returns non-zero if the chown(2) call may not be used on this file.  If fd or  path
              refer to a directory, then this applies to all files in that directory.  The corre-
              sponding macro is _POSIX_CHOWN_RESTRICTED.

       _PC_NO_TRUNC
              returns non-zero if accessing filenames longer than  _POSIX_NAME_MAX  generates  an
              error.  The corresponding macro is _POSIX_NO_TRUNC.

       _PC_VDISABLE
              returns  non-zero if special character processing can be disabled, where fd or path
              must refer to a terminal.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ