Commit Graph

539 Commits

Author SHA1 Message Date
Tobias Klauser
fa43e7bc11 unix: add marker comments to zsyscall_solaris_amd64.go
These marker comments are in every other zsyscall_*.go file generated by
mksyscall.pl and mksyscall_aix.pl. Also add them to the file generated
by mksyscall_solaris.pl.

Change-Id: Ic0ad5f28dd0a0934aa768f58ccc390b613a36abb
Reviewed-on: https://go-review.googlesource.com/c/141557
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-11 15:26:04 +00:00
Tobias Klauser
4497e2df6f unix: convert errorList and signalList to new format for linux/sparc64
This wasn't converted during CL 110875

Updates golang/go#25134

Change-Id: Iaa579e0c173d3e27cf9f7e20072752277089beb1
Reviewed-on: https://go-review.googlesource.com/c/139977
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-10-05 13:31:03 +00:00
Tobias Klauser
f81de40a84 unix: add KexecFileLoad on linux/{amd64,ppc64x,s390x}
Add a wrapper for the kexec_file_load syscall on the architectures that
implement it (amd64, ppc64x, s390x). See
http://man7.org/linux/man-pages/man2/kexec_file_load.2.html

Change-Id: Ie29f871902176610a6ba7ed0a7bcc95c10eb172b
Reviewed-on: https://go-review.googlesource.com/c/140037
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-10-05 13:07:39 +00:00
Tobias Klauser
8469e31483 unix: export sizeof consts
Export the sizeof(Ptr|Short|Int|Long|LongLong) consts. This allows users
to get this information (e.g. for alignment purposes) without using cgo
or generating these constants themselves.

Change-Id: I8640482bf67b89c2f2b6e9a116ba7bc268f8135a
Reviewed-on: https://go-review.googlesource.com/c/139617
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-04 14:53:25 +00:00
Tobias Klauser
af653ce8b7 unix: use correctly aligned result buffer in SysctlClockinfo
It's not guaranteed that the []byte buffer will be aligned as
required for Clockinfo. Use a Clockinfo var for the sysctl call
instead.

This came up during the review for SysctlUvmexp on OpenBSD in CL
139278. Thanks to Ian Lance Taylor for pointing this out.

Change-Id: Idc7a624922da7249c6e7d5ce0236a431b58ebe5f
Reviewed-on: https://go-review.googlesource.com/c/139279
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-10-03 14:59:44 +00:00
Tobias Klauser
679a27dec1 unix: add SysctlUvmexp on OpenBSD
OpenBSD uses sysctl with struct uvmexp to get information from the
virtual memory system of the kernel. Add type Uvmexp and the
SysctlUvmexp function to query this information.

This will be used in github.com/tklauser/go-sysconf to get
_SC_AVPHYS_PAGES on OpenBSD.

Change-Id: I96ded2d1be37e5307bab55e79b13234cc93d21e6
Reviewed-on: https://go-review.googlesource.com/c/139278
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-10-03 14:57:07 +00:00
Tobias Klauser
219bb53033 unix: re-add vm.* sysctl strings on openbsd/amd64
These sysctl strings were lost in CL 114075 which updated openbsd/amd64
to OpenBSD 6.3. Re-add them by adding uvm/uvmexp.h to mksysctl_openbsd.pl.
The defines for the VM_* constants were moved to this header in
OpenBSD 6.3.

Change-Id: If4291380d6d8235485d91c4442076dd03485bc2c
Reviewed-on: https://go-review.googlesource.com/c/139277
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-10-03 12:56:02 +00:00
Matt Layher
e4b3c5e906 unix: add NCSI generic netlink constants
Change-Id: I458f69e01fb64ff66f0b518c547d9eca3e8625cb
Reviewed-on: https://go-review.googlesource.com/138375
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-28 13:38:29 +00:00
Tobias Klauser
dad3d9fb7b unix: add ClockGetres on Linux
Change-Id: Id60c9310bad85e02ec81b04e7f304f058b680822
Reviewed-on: https://go-review.googlesource.com/138116
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-27 15:05:00 +00:00
Tobias Klauser
8ccfc68037 unix: add SysctlClockinfo on NetBSD
NetBSD uses sysctl with struct clockinfo to get clock rate information
from the kernel. Add type Clockinfo and the SysctlClockinfo function
to query this information.

This will be used in github.com/tklauser/go-sysconf to get _SC_CLK_TCK
on NetBSD.

Change-Id: I9e67d766f491ec3b460f26cb243b3595f0ba4d69
Reviewed-on: https://go-review.googlesource.com/138035
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-27 15:03:35 +00:00
Lynn Boger
c2ed4eda69 unix: fix TestSchedSetaffinity for smt settings
If a system has the ability to disable some cores, as on
ppc64 with the ppc64_cpu command, then TestSchedSetaffinity will
fail if the CPUset passed to Setaffinity includes one that has
been disabled.

This adds a check to use values from the oldMask, which are the valid
cores returned from Getaffinity, to pass to Setaffinity.

Fixes golang/go#27875

Change-Id: I9656f41867afc18e0eaedc4bdef5f75e137a1fcd
Reviewed-on: https://go-review.googlesource.com/137675
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-26 16:07:41 +00:00
Tobias Klauser
2f1df4e56c unix: add additional rlimit resource constants on NetBSD
CL 45052 added them to mkerrors.sh but they weren't generated on NetBSD. Do so now.

Change-Id: I314b0b7b203aba910a5733f9fbb63b1a0e6ccecf
Reviewed-on: https://go-review.googlesource.com/137595
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-26 14:17:14 +00:00
Tobias Klauser
b09afc3d57 unix: add MNT_* flags on OpenBSD
Now that all BSDs define MNT_NOWAIT, use it in TestGetfsstat instead of
the locally defined copy.

Change-Id: Ib6cee08a6d3a034464c7b79591605b49889a46ae
Reviewed-on: https://go-review.googlesource.com/137195
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-25 11:27:36 +00:00
Jordan Rhee
90868a75fe windows: add support for windows/arm
Updates golang/go#26148

Change-Id: I0425244bfb0c8f600a6f02d9d7b228e175a720a4
Reviewed-on: https://go-review.googlesource.com/127665
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-24 17:59:46 +00:00
Tobias Klauser
f02c79500a unix: add MNT_* flags on DragonflyBSD
Change-Id: I0326a7bfcf3cd794eb1158055a8ee98a396d3b47
Reviewed-on: https://go-review.googlesource.com/136818
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-24 17:12:10 +00:00
Tobias Klauser
c01370cb5c unix: add MNT_* flags on NetBSD
Change-Id: Ifc720a583a830883908e83bfe0e2d74c2bfa013f
Reviewed-on: https://go-review.googlesource.com/136817
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-24 14:20:50 +00:00
Matt Layher
d47a0f3392 unix: implement Linux AF_XDP sockets
Provides access to the Linux AF_XDP socket family.  For more
information on AF_XDP, see:
https://www.kernel.org/doc/html/latest/networking/af_xdp.html.

Change-Id: I7efb82c4a67da3e15932e3c0d882f0bad7ba16ef
Reviewed-on: https://go-review.googlesource.com/136695
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2018-09-21 16:39:48 +00:00
Tobias Klauser
d641721ec2 unix: add more RTA_* constants on Linux
Now all non-deprecated RTA_* constants as of Linux v4.18 are present.

Change-Id: Ib04e233015f381ceb7c7e06b3d808f3c7948f5b4
Reviewed-on: https://go-review.googlesource.com/136456
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-09-20 11:09:15 +00:00
Tony Reix
1561086e64 unix: add Termio, Winsize, Statfs_t, TC[GS]ET, Mkdir and Mknod for AIX
These changes add Termio/Winsize/Statfs_t for AIX, constants TC[GS]ET and the syscalls Mkdir and Mknod.
It also changes the comments for AIX which still were talking about Linux and glibc.

Change-Id: I64325330328d6e16cff540f103fdfa533b7d8f5b
Reviewed-on: https://go-review.googlesource.com/136295
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2018-09-19 16:26:11 +00:00
Tobias Klauser
1061eb656b unix: change MemfdCreate flags parameter to int for all GOARCHes
For some reason I didn't completely re-generate the zsyscall_linux_*
files for all GOARCHes during review of CL 135915. Do so now such that
the flags parameter is of type int on all GOARCHes.

Change-Id: Ifc4afacfbedb70f3818b23ed3ea468745bbdb455
Reviewed-on: https://go-review.googlesource.com/136296
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-19 16:13:05 +00:00
Tobias Klauser
ee1b12c67a unix: add MemfdCreate on Linux
Add a wrapper for the memfd_create syscall on Linux. See
http://man7.org/linux/man-pages/man2/memfd_create.2.html for more
information.

Also add the corresponding MFD_* constants to be used in the flags
argument.

Change-Id: Ib30a007e15575a38ecf204601ffede9c913799b6
Reviewed-on: https://go-review.googlesource.com/135915
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-18 15:37:33 +00:00
Leigh McCulloch
d0be0721c3 unix: correct misspelling in test output
The TestRlimitAs function has fatal output that uses the word 'suceeded'
that is a misspelling of 'succeeded'.

Change-Id: Id235c9e38338e09c5c06c4ed4a0037afc8f6f2bd
GitHub-Last-Rev: 84d6abe576
GitHub-Pull-Request: golang/sys#17
Reviewed-on: https://go-review.googlesource.com/134220
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-09 12:40:46 +00:00
Leigh McCulloch
4526dd3c8b windows: correct misspelling in comment
The comment for ConsoleScreenBufferInfo uses the word 'retreive' that
is a misspelling of 'retrieve'.

Change-Id: Idd9fb0c5082b6a2b10badbbb162e312710bfe68b
GitHub-Last-Rev: 08d62a57df
GitHub-Pull-Request: golang/sys#18
Reviewed-on: https://go-review.googlesource.com/134221
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-09 07:10:14 +00:00
Matt Layher
917fdcba13 unix: add remaining RTA_* constants for use with rtnetlink on Linux
Change-Id: Ie48ba8d5bacc73b69d1b964d55ae4d443ab46aac
Reviewed-on: https://go-review.googlesource.com/134116
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-09-07 20:22:04 +00:00
Tobias Klauser
8cf3aee429 unix: add support for linux/riscv64
Add syscall wrappers, error constants and types for linux/riscv64

Switch docker image to Ubuntu 18.10 in order to get qemu supporting
riscv64. Also set the uname release string for qemu to 4.15 (the first
Linux kernel version with riscv64 support), because otherwise running
the generating C program in mkerrors.sh on a host with an older kernel
would fail with a "FATAL: kernel too old".

Note that linux/riscv64 is currently only usable using gccgo.

Updates golang/go#27532

Change-Id: Ic420f842342418443474cac72d38adff14d1b938
Reviewed-on: https://go-review.googlesource.com/133735
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-06 13:30:57 +00:00
Tobias Klauser
ebe1bf3edb unix: add SYNC_FILE_RANGE_* constants on Linux
These are usefule to specify SyncFileRange's flags argument.

Change-Id: I1726c3adf55aaebac61beed09d39a48a8e040a93
Reviewed-on: https://go-review.googlesource.com/133475
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-05 08:04:54 +00:00
Tobias Klauser
d9c697bf0b unix: correct argument order for SyncFileRange syscall on linux/ppc64{,le}
On linux/ppc64{,le} the SYS_SYNC_FILE_RANGE2 syscall is used to
implement SyncFileRange. This syscall has a different argument order
than SYS_SYNC_FILE_RANGE. Apart from that the implementations of both
syscalls are the same, so use a simple wrapper to invoke the syscall
with the correct argument order.

For context see:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=edd5cd4a9424f22b0fa08bef5e299d41befd5622

Fixes golang/go#27485

Change-Id: Idc154eab7b7c521a34de821e1d1a97095e96fed0
Reviewed-on: https://go-review.googlesource.com/133215
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-05 06:47:16 +00:00
Brad Fitzpatrick
2b024373dc Revert "unix: implement SyncFileRange for ARM"
This reverts commit 1b73967140
(https://go-review.googlesource.com/c/sys/+/133015)

Reason for revert: breaks the build. No Syscall9 on linux/arm.
Not obvious this was ever compiled, much less tested. (Unless it
was only for gccgo, but that was never specified.)

Fixes golang/go#27475

Change-Id: I5ed04c9ab672ce33adc64bdaec601bf73df42269
Reviewed-on: https://go-review.googlesource.com/133095
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-03 19:01:38 +00:00
Andrei Gherzan
1b73967140 unix: implement SyncFileRange for ARM
Change-Id: I5a98a732c0e6a229ab93acbce08b4f780f860f72
GitHub-Last-Rev: 886bffd986
GitHub-Pull-Request: golang/sys#16
Reviewed-on: https://go-review.googlesource.com/133015
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-09-03 17:15:48 +00:00
Tobias Klauser
fa5fdf94c7 windows: add support for AF_UNIX sockets
CL 125456 added the implementation of AF_UNIX to the syscall package.
Add the same implementation to golang.org/x/sys/windows as well.

This works only on Windows 10.

https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/

Updates golang/go#26072

Change-Id: Ibd4a17342ed4f9f4f2b16b82c7b02834e681b7b4
Reviewed-on: https://go-review.googlesource.com/132555
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2018-08-31 09:46:39 +00:00
Tobias Klauser
49385e6e15 unix: update Dockerfile to Go 1.11
Change-Id: I934702b11d21434d9c6646228b05396d2aef1820
Reviewed-on: https://go-review.googlesource.com/132215
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-30 15:15:30 +00:00
Tony Reix
d99a578cf4 unix: code for AIX ppc and ppc64, for gccgo
Change-Id: I187edceaf3604d73110940bd5580fa127a85e87d
Reviewed-on: https://go-review.googlesource.com/129735
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2018-08-28 06:51:06 +00:00
Tobias Klauser
4910a1d54f unix: add UBI ioctl constants on Linux
Change-Id: Icde91c6504cd45d78208c6041bf6dc097d2d8334
Reviewed-on: https://go-review.googlesource.com/131235
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-24 14:33:01 +00:00
Tobias Klauser
11551d06cb unix: use pipe2 syscall on FreeBSD instead of pipe
The pipe syscall no longer exists in FreeBSD 11 and 12.
The pipe2 syscall exists in all currently supported FreeBSD
versions: 10, 11 and the upcoming 12.

Follow CL 38426

Change-Id: If908eecfd2662e6f32a229ac52f27d9a2ec2b9d7
Reviewed-on: https://go-review.googlesource.com/130995
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-23 14:40:17 +00:00
Tobias Klauser
3b58ed4ad3 unix: add additional file mode bit constants from sys/stat.h on Solaris
Also generate the constants using mkerrors.sh instead of having to list
each of them manually in types_solaris.go

In order to avoid _*_MAGIC constants being generated, also adjust the
corresponding rule in mkerrors.sh

Change-Id: If9193b12c2a2ec3b509a324be78329fee35a240d
Reviewed-on: https://go-review.googlesource.com/130355
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-21 14:08:42 +00:00
Kevin Burke
4ea2f632f6 unix: add example for Flock
The method signature does not explain much about how to use the
function, and which arguments to invoke it with, so an example would
be helpful.

Change-Id: I95747567b2cafe70da1e04939c39f6b507f12684
Reviewed-on: https://go-review.googlesource.com/130317
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-08-21 04:44:26 +00:00
Tobias Klauser
1a700e749c unix: add NOSTD syscall numbers on FreeBSD
The syscalls marked as NOSTD are defined in kernel modules that
might be missing on some systems, but are usually present.

Fixes golang/go#27072

Change-Id: Icf9188df85b54872eb80ba73828f35aa578d49aa
Reviewed-on: https://go-review.googlesource.com/129855
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-20 14:55:01 +00:00
Tobias Klauser
1c9583448a unix: add additional file mode bit constants from sys/stat.h on FreeBSD
Also generate the constants using mkerror.sh instead of having to list
each of them manually in types_freebsd.go

Change-Id: I00d38d0e528900be7c5afca05c8dc50ee7628b20
Reviewed-on: https://go-review.googlesource.com/129317
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-16 05:55:13 +00:00
Tobias Klauser
871208d995 unix: add additional file mode bit constants from sys/stat.h on DragonflyBSD
Also generate the constants using mkerror.sh instead of having to list
each of them manually in types_dragonfly.go

Change-Id: I89b933834be6aa0eeec3d5ddbbf610e693b29327
Reviewed-on: https://go-review.googlesource.com/129316
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-16 05:53:47 +00:00
Joe Richey joerichey@google.com
14742f9018 windows: add Wincrypt.h Cert related values
Values cross-referenced between Visual Studio 2017's "Wincrypt.h",
https://github.com/wine-mirror/wine/blob/master/include/wincrypt.h,
and the MSDN documentation at:

CertOpenStore:
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa376559.aspx
CertAddCertificateContextToStore:
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa376009.aspx
CertTrustStatus:
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa377590.aspx
CertVerifyCertificateChainPolicy:
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa377163.aspx
SSLExtraCertChainPolicyPara:
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa387784.aspx

Change-Id: I143e10c4f47caa2550fb93cd10bdec00bbb2b32d
GitHub-Last-Rev: b4b8c6c419
GitHub-Pull-Request: golang/sys#15
Reviewed-on: https://go-review.googlesource.com/129275
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2018-08-15 09:31:51 +00:00
Tobias Klauser
4e1fef5609 unix: update Dockerfile to Linux 4.18, glibc 2.28 and Go 1.11beta3
Including linux/stat.h in mkerrors.sh is no longer necessary because the
statx types and constants were added to the glibc headers.

Change-Id: I643c35fd2da76dd2c15015556658d7fa862249c4
Reviewed-on: https://go-review.googlesource.com/129100
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-14 07:20:32 +00:00
Gianguido Sora`
98c5dad5d1 unix: update the OpenBSD pledge interface to handle execpromises
The current Pledge function still takes into account the deprecated
"paths" argument, which has been replaced by "execpromises".
This change has been committed to OpenBSD on the 11 December 2017:
https://marc.info/?l=openbsd-tech&m=151302727506669.
This commit updates the Pledge function interface to reflect this
change.

Fixes golang/go#26824

Change-Id: Id6255b0432cf0a33e680e342dd23c7b02d0aa78f
Reviewed-on: https://go-review.googlesource.com/127762
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-10 17:33:57 +00:00
Tobias Klauser
f0d5e33068 unix: add *xattr functions on NetBSD
Reuse the functions added for FreeBSD.

Change-Id: Icf5bf65c82f91147659947f6ea296dd2555724a0
Reviewed-on: https://go-review.googlesource.com/128256
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-10 07:02:07 +00:00
Tobias Klauser
57f5ac0287 unix: add additional file mode bit constants from sys/stat.h on OpenBSD
Also generate the constants using mkerror.sh instead of having to list
each of them manually in types_openbsd.go

Change-Id: I7750ae3cb1e923a13e0035d58d58a81c35e7e86b
Reviewed-on: https://go-review.googlesource.com/128775
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-10 06:36:40 +00:00
Tobias Klauser
904bdc2570 unix: add F*xattr on Darwin
Add Fgetxattr, Flistxattr, Fremovexattr and Fsetxattr on Darwin. Also
add a corresponding test.

Updates golang/go#26832

Change-Id: Id75bfce90ccc024b567a7b066a9188a615b9eec4
Reviewed-on: https://go-review.googlesource.com/128537
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-08 15:40:34 +00:00
Tobias Klauser
3249cb6984 unix: drop incorrect Fsetxattr size return value
Fsetxattr should just return an error (like Setxattr and like Fsetxattr
is already doing on FreeBSD).

Fix for CL 128176

Updates golang/go#26832

Change-Id: Id1c1315d9eb6952128e0c0ce44b19060e0403cc0
Reviewed-on: https://go-review.googlesource.com/128495
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-08 14:12:55 +00:00
Jan Lehnardt
f62c962c3e unix: add S_IRWXG and S_IRWXO to FreeBSD types
I found this during https://github.com/DataDog/datadog-agent/pull/2079

Change-Id: I51d57e7e3cedb8b23e720bc03f38504dc0ad063d
GitHub-Last-Rev: 4e1c193db8
GitHub-Pull-Request: golang/sys#13
Reviewed-on: https://go-review.googlesource.com/126620
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-08-08 13:53:31 +00:00
Tobias Klauser
acbc56fc70 unix: add F*xattr on Linux
Add Fgetxattr, Flistxattr, Fremovexattr and Fsetxattr on Linux.

Updates golang/go#26832

Change-Id: Ia79915e91a928188c6c985ef301d5445f630b19c
Reviewed-on: https://go-review.googlesource.com/128176
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-07 16:23:57 +00:00
Matt Layher
90887a55d6 unix: add IFLA_INFO_KIND on Linux
Change-Id: Ib31ac102a973690d0391626102e1646c8dd387cb
Reviewed-on: https://go-review.googlesource.com/128315
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-07 15:54:10 +00:00
Tobias Klauser
0718ef2ef2 unix: remove *xattr from list of unimplemented syscalls on FreeBSD
These are all implemented on FreeBSD.

Change-Id: I5f3558c19d7540e08cfa77a06fffd80a9c80f1f3
Reviewed-on: https://go-review.googlesource.com/128175
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-07 14:11:23 +00:00