moby--moby/pkg/system
Kir Kolyshkin 669056f93d pkg/system.getxattr: handle changed size case
lgetxattr(2) man page says:

> If size is specified as zero, these calls return the  current  size  of
> the  named extended attribute (and leave value unchanged).  This can be
> used to determine the size of the buffer that should be supplied  in  a
> subsequent  call.   (But, bear in mind that there is a possibility that
> the attribute value may change between the two calls,  so  that  it  is
> still necessary to check the return status from the second call.)

The current code does not handle the case when the size changes between
the two calls, and the new size is larger.

Fix the above problem, and slightly simplify the code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-02-26 07:56:12 -08:00
..
args_windows.go Windows: (WCOW) Generate OCI spec that remote runtime can escape 2019-03-12 18:41:55 -07:00
chtimes.go Add canonical import comment 2018-02-05 16:51:57 -05:00
chtimes_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
chtimes_unix.go pkg/system: normalize comment formatting 2019-11-27 15:38:17 +01:00
chtimes_unix_test.go unconvert: remove unnescessary conversions 2019-09-18 12:57:33 +02:00
chtimes_windows.go pkg/system: normalize comment formatting 2019-11-27 15:38:17 +01:00
chtimes_windows_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
errors.go Add canonical import comment 2018-02-05 16:51:57 -05:00
exitcode.go Add canonical import comment 2018-02-05 16:51:57 -05:00
filesys_unix.go Allow system.MkDirAll() to be used as drop-in for os.MkDirAll() 2019-08-08 15:05:49 +02:00
filesys_windows.go pkg/system: normalize comment formatting 2019-11-27 15:38:17 +01:00
init.go Add canonical import comment 2018-02-05 16:51:57 -05:00
init_unix.go Windows: Experimental: Allow containerd for runtime 2019-03-12 18:41:55 -07:00
init_windows.go Use hcsshim osversion package for Windows versions 2019-10-22 02:53:00 +02:00
lcow.go system: add back lcow validation function 2018-06-27 15:24:26 -07:00
lcow_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
lcow_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
lstat_unix.go Fix some go_vet issues 2018-12-19 23:57:06 +01:00
lstat_unix_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
lstat_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
meminfo.go Add canonical import comment 2018-02-05 16:51:57 -05:00
meminfo_linux.go goimports: fix imports 2019-09-18 12:56:54 +02:00
meminfo_unix_test.go goimports: fix imports 2019-09-18 12:56:54 +02:00
meminfo_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
meminfo_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
mknod.go Add canonical import comment 2018-02-05 16:51:57 -05:00
mknod_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
path.go Narrow dependencies of pkg/system 2019-09-06 16:25:14 -07:00
path_unix.go Windows: Go1.11: Use long path names in build context (TestBuildSymlinkBreakout) 2018-09-05 17:01:05 -07:00
path_windows.go Windows: Go1.11: Use long path names in build context (TestBuildSymlinkBreakout) 2018-09-05 17:01:05 -07:00
path_windows_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
process_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
process_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
rm.go pkg/system: return nil explicitly 2018-07-29 01:31:08 +03:00
rm_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
stat_darwin.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stat_freebsd.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stat_linux.go cast Dev and Rdev of Stat_t to uint64 for mips 2019-08-01 20:22:49 +08:00
stat_openbsd.go Add canonical import comment 2018-02-05 16:51:57 -05:00
stat_unix.go Fix some go_vet issues 2018-12-19 23:57:06 +01:00
stat_unix_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
stat_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
syscall_unix.go Add canonical import comment 2018-02-05 16:51:57 -05:00
syscall_windows.go Merge pull request #40246 from thaJeztah/system_windows_cleanup 2019-12-19 11:36:29 -08:00
syscall_windows_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
umask.go Add canonical import comment 2018-02-05 16:51:57 -05:00
umask_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
utimes_unix.go Use UtimesNano from x/sys/unix to implement LUtimesNano 2019-08-22 08:25:13 +02:00
utimes_unix_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00
utimes_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
xattrs_linux.go pkg/system.getxattr: handle changed size case 2020-02-26 07:56:12 -08:00
xattrs_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00