Hello Mikhail, I think this is technically feasible, and having chauthor() and lchauthor() as GNU/Hurd-specific glibc extensions could provide a more convenient interface, consistent with chmod() and chown().
Since GNU/Hurd already provides the file_chauthor RPC, the implementation should be relatively straightforward. A pathname-based wrapper could obtain the appropriate file port, invoke file_chauthor, release the port, and translate errors into errno. For lchauthor(), symlink handling would need to be considered explicitly, using semantics comparable to lchmod(). However, there is already another interface worth considering. GNU/Hurd's glibc implementation supports the "gnu.author" extended attribute through the setxattr() family, internally using file_chauthor. Before introducing new public functions, I think it would be useful to investigate whether this existing interface adequately handles directories and symlinks. In particular, we should determine whether the directory issue is caused by pathname lookup, permissions, or the underlying filesystem implementation. If there is still a practical usability gap, adding chauthor() and lchauthor() could be worthwhile. I would initially consider these GNU/Hurd-specific extensions rather than additions to the ISO C standard. A small implementation accompanied by tests for regular files, directories, and symbolic links would be a reasonable starting point. Best regards On Thu, Oct 22, 2026 at 8:54 AM Mikhail Karpov <[email protected]> wrote: > Hello, > > Are there any thoughts on adding chauthor/lchauthor functions to the C > standard library, by analogy with chmod/lchmod and chown/chown? Currently, > the st_author field can be modified using file_chauthor, but this is not > particularly convenient, as it requires using functions from > GNU/Hurd-specific libraries. Furthermore, this approach makes it difficult > to modify the st_author field for directories. > Is this feasible, and if so, would it be worth pursuing? > > Thanks, > > -- > Mikhail Karpov > > >
