[PATCH] bind.2: Document possible errors from protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When looking through the errors of socket(2) I noticed that it specifies
the selected underlying protocol may extend the potential errors returned.
For example, using AF_PACKET and SOCK_RAW can return EPERM if the user
does not have CAP_NET_RAW or uid 0 (This is all fully documented).

However, AF_PACKET and SOCK_RAW extend the potential errors
returned from bind as well. For example, calling bind with an invalid
sll_ifindex set on the sock_addr passed in will return ENODEV.

While this possibility is documented in the raw(7) manpage, the bind(2)
manpage does not mention that its potential set of errors can be extended by
the underlying protocol. This patch simply duplicates the relevant language
from the socket(2) manpage to the bind(2) manpage.

It is possible further extensions for send, recv, setsockopt, etc. are also
undocumented, but I have not yet verified this.
---
 man/man2/bind.2 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/man/man2/bind.2 b/man/man2/bind.2
index 388974145..a59ac16f9 100644
--- a/man/man2/bind.2
+++ b/man/man2/bind.2
@@ -184,6 +184,8 @@ .SH ERRORS
 .TP
 .B EROFS
 The socket inode would reside on a read-only filesystem.
+.P
+Other errors may be generated by the underlying protocol modules.
 .SH STANDARDS
 POSIX.1-2008.
 .SH HISTORY
-- 
2.46.1

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux