aboutsummaryrefslogtreecommitdiff
path: root/ext2fs/xattr.c
Commit message (Collapse)AuthorAgeFilesLines
* ext2fs: Update to upstream Hurd-reserved xattr index for "gnu.*".Jan (janneke) Nieuwenhuizen2020-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3980bd3b406addb327d858aebd19e229ea340b9a This supports setting (and reading) of passive trasnlators from GNU/Linux, e.g. dd if=/dev/zero of=file bs=1k count=1000 losetup /dev/loop0 file mke2fs -t ext2 -o hurd -O ext_attr /dev/loop0 mount -t ext2 -o x-xattr-translator-records /dev/loop0 /mnt mkdir -p /mnt/servers/socket touch /mnt/servers/socket/1 setfattr --name=gnu.translator --value='"/hurd/pflocal\0"' /mnt/servers/socket/1 getfattr --name=gnu.translator /mnt/servers/socket/1 # file: 1 gnu.translator="/hurd/pflocal" * ext2fs/xattr.c (xattr_prefixes): For "gnu.*", use index for the Hurd (10).
* ext2fs: Fix warning.Justus Winter2017-08-101-1/+1
| | | | * ext2fs/xattr.c (ext2_set_xattr): Initialize 'block'.
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-051-2/+2
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* ext2fs: Reduce verbosity of missing xattr support on the FSSamuel Thibault2017-06-091-1/+1
| | | | | * ext2fs/xattr.c (ext2_free_xattr_block): Only warn about missing ext2fs support in debugging mode.
* ext2fs: Reduce verbosity of missing xattr support on the FSSamuel Thibault2017-05-071-2/+2
| | | | | * ext2fs/xattr.c (ext2_list_xattr, ext2_get_xattr): Only warn about missing ext2fs support in debugging mode.
* ext2fs: fix extended attribute retrievalRichard Braun2017-01-061-2/+1
| | | | | * ext2fs/xattr.c (ext2_get_xattr): Reset buffer size before each call to xattr_entry_get.
* ext2fs: minor cleanupRichard Braun2017-01-061-4/+4
| | | | | | | | | | | | | Fix some typos, types, add a few checks against integer overflows. ext2fs/inode.c (diskfs_user_read_node): Initialize datalen to 0. (diskfs_set_translator): Fix typo. (diskfs_get_translator): Change datalen type to size_t. * ext2fs/xattr.c (xattr_entry_get): Change type of block parameter to void *. (xattr_entry_create): Guard against integer overflows. (xattr_entry_replace): Likewise. (ext2_set_xattr): Fix typo.
* ext2fs: fix block referenceRichard Braun2017-01-061-5/+4
| | | | | ext2fs/xattr.c (ext2_get_xattr): Keep the inode reference until the block reference is done.
* ext2fs: Fix potential block leak.Justus Winter2017-01-061-0/+4
| | | | | | * ext2fs/xattr.c (ext2_set_xattr): We allocate a block, but only register it as the inodes acl block on success. Make sure to deallocate the block otherwise.
* ext2fs: Fix block allocation.Justus Winter2017-01-061-1/+1
| | | | | * ext2fs/xattr.c (ext2_set_xattr): Check returned block number before mapping it.
* ext2fs: Fix block leak in xattr code.Justus Winter2017-01-061-0/+8
| | | | | | * ext2fs/xattr.c (ext2_set_xattr): Avoid allocating and leaking a block if the caller tries to delete an extended attribute from a node that has no extended attribute in the first place.
* ext2fs: Use correct type for sizes.Justus Winter2017-01-061-19/+19
| | | | | | | * ext2fs/ext2fs.h (ext2_{list,get,set}_xattr): Use 'size_t'. * ext2fs/xattr.c (xattr_entry_{list,get,create): Use 'size_t' where appropriate. (ext2_{list,get,set}_xattr): Likewise.
* ext2fs: Add support for xattrShengyu Zhang2017-01-061-0/+866
* ext2fs/Makefile (SRCS): Add xattr.c. * ext2fs/ext2_fs.h: Define EXT2_FEATURE_COMPAT_EXT_ATTR. * ext2fs/ext2fs.h: Add xattr functions. * ext2fs/ialloc.c (diskfs_free_node): Free xattr block. * ext2fs/xattr.c: xattr implement. * ext2fs/xattr.h: Likewise.