.\" -*- coding: UTF-8 -*- .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" 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 "10 Octubre 2019" Linux "Manual del Programador de Linux" .SH NOMBRE getdomainname, setdomainname \- obtiene/asigna el nombre del dominio .SH SINOPSIS \fB#include \fP .PP \fBint getdomainname(char *\fP\fIname\fP\fB, size_t \fP\fIlen\fP\fB);\fP .br \fBint setdomainname(const char *\fP\fIname\fP\fB, size_t \fP\fIlen\fP\fB);\fP .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP .ad l \fBgetdomainname\fP(), \fBsetdomainname\fP(): .nf .\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8 Since glibc 2.21: _DEFAULT_SOURCE In glibc 2.19 and 2.20: _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) Up to and including glibc 2.19: _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) .fi .ad .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 adecuadamente. .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 "CONFORME A" .\" But they appear on most systems... POSIX no especifica estas llamadas. .SH NOTAS 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. .PP 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 "VÉASE TAMBIÉN" \fBgethostname\fP(2), \fBsethostname\fP(2), \fBuname\fP(2), \fButs_namespaces\fP(7) .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en \%https://www.kernel.org/doc/man\-pages/. .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 .