.\" -*- coding: UTF-8 -*- .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Modified 1997-08-25 by Nicolás Lichtmaier .\" Modified 2004-06-17 by Michael Kerrisk .\" Modified 2008-11-27 by mtk .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH getdomainname 2 "30 Marzo 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE getdomainname, setdomainname \- obtiene/asigna el nombre del dominio .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .PP \fBint getdomainname(char *\fP\fInombre\fP\fB, size_t \fP\fIlen\fP\fB);\fP \fBint setdomainname(const char *\fP\fInombre\fP\fB, size_t \fP\fIlen\fP\fB);\fP .fi .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBgetdomainname\fP(), \fBsetdomainname\fP(): .nf .\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8 A partir de glibc 2.21: _DEFAULT_SOURCE En glibc 2.19 y 2.20: _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) Para la versión de glibc 2.19 y superiores: _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) .fi .SH DESCRIPCIÓN These functions are used to access or to change the NIS domain name of the host system. More precisely, they operate on the NIS domain name associated with the calling process's UTS namespace. .PP \fBsetdomainname\fP() sets the domain name to the value given in the character array \fIname\fP. The \fIlen\fP argument specifies the number of bytes in \fIname\fP. (Thus, \fIname\fP does not require a terminating null byte.) .PP \fBgetdomainname\fP() returns the null\-terminated domain name in the character array \fIname\fP, which has a length of \fIlen\fP bytes. If the null\-terminated domain name requires more than \fIlen\fP bytes, \fBgetdomainname\fP() returns the first \fIlen\fP bytes (glibc) or gives an error (libc). .SH "VALOR DEVUELTO" En caso de éxito se devuelve cero. En caso de error se devuelve \-1, y \fIerrno\fP se configura para indicar el error. .SH ERRORES \fBsetdomainname\fP() puede dar fallos con los siguientes errores: .TP \fBEFAULT\fP \fIname\fP apuntaba afuera del espacio de direcciones del usuario. .TP \fBEINVAL\fP \fIlen\fP era demasiado grande o menor que 0. .TP \fBEPERM\fP The caller did not have the \fBCAP_SYS_ADMIN\fP capability in the user namespace associated with its UTS namespace (see \fBnamespaces\fP(7)). .PP \fBgetdomainname\fP() puede dar fallos con los siguientes errores: .TP \fBEINVAL\fP Para \fBgetdomainname\fP() bajo libc: \fIname\fP es NULL o \fIname\fP tiene más de \fIlen\fP bytes. .SH VERSIONES On most Linux architectures (including x86), there is no \fBgetdomainname\fP() system call; instead, glibc implements \fBgetdomainname\fP() as a library function that returns a copy of the \fIdomainname\fP field returned from a call to \fBuname\fP(2). .SH ESTÁNDARES .\" But they appear on most systems... None. .SH HISTORIAL Since Linux 1.0, the limit on the length of a domain name, including the terminating null byte, is 64 bytes. In older kernels, it was 8 bytes. .SH "VÉASE TAMBIÉN" \fBgethostname\fP(2), \fBsethostname\fP(2), \fBuname\fP(2), \fButs_namespaces\fP(7) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Miguel Angel Sepulveda , Nicolás Lichtmaier , Gerardo Aburruzaga García y Marcos Fouces . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .