setdomainname(2) - Linux man page
Name
getdomainname, setdomainname - get/set domain nameSynopsis
#include <unistd.h>int getdomainname(char *name, size_t len);
int setdomainname(const char *name, size_t len);
Description
Return Value
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.Errors
- EFAULT
- For setdomainname(): name pointed outside of user address space.
- EINVAL
- For getdomainname() under libc: name is NULL or name is longer than len bytes.
- EINVAL
- For setdomainname(): len was negative or too large.
- EPERM
- For setdomainname(): the caller is unprivileged (Linux: does not have the CAP_SYS_ADMIN capability).
