.\" -*- 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 października 2019 r." Linux "Podręcznik programisty Linuksa" .SH NAZWA getdomainname, setdomainname \- pobranie/ustawienie nazwy domeny NIS .SH SKŁADNIA \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 Wymagane ustawienia makr biblioteki glibc (patrz \fBfeature_test_macros\fP(7)): .RE .PP .ad l \fBgetdomainname\fP(), \fBsetdomainname\fP(): .nf .\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8 Od glibc 2.21: _DEFAULT_SOURCE W glibc 2.19 i 2.20: _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) Do glibc 2.19 włącznie: _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) .fi .ad .SH OPIS 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 "WARTOŚĆ ZWRACANA" Po pomyślnym zakończeniu zwracane jest zero. Po błędzie zwracane jest \-1 i odpowiednio ustawiane jest \fIerrno\fP. .SH BŁĘDY \fBsetdomainname\fP() może zawieść z powodu następujących błędów: .TP \fBEFAULT\fP \fIname\fP wskazywało poza przestrzeń adresową użytkownika. .TP \fBEINVAL\fP \fIlen\fP było ujemne lub zbyt duże. .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() może zawieść z powodu następujących błędów: .TP \fBEINVAL\fP Dla \fBgetdomainname\fP() pod libc: \fIname\fP jest równe \fBNULL\fP lub \fIname\fP jest dłuższe niż \fIlen\fP bajtów. .SH "ZGODNE Z" .\" But they appear on most systems... POSIX nie określa tych funkcji. .SH UWAGI 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 "ZOBACZ TAKŻE" \fBgethostname\fP(2), \fBsethostname\fP(2), \fBuname\fP(2), \fButs_namespaces\fP(7) .SH "O STRONIE" Angielska wersja tej strony pochodzi z wydania 5.10 projektu Linux \fIman\-pages\fP. Opis projektu, informacje dotyczące zgłaszania błędów oraz najnowszą wersję oryginału można znaleźć pod adresem \%https://www.kernel.org/doc/man\-pages/. .PP .SH TŁUMACZENIE Autorami polskiego tłumaczenia niniejszej strony podręcznika są: Przemek Borys , Andrzej Krzysztofowicz i Michał Kułach . .PP Niniejsze tłumaczenie jest wolną dokumentacją. Bliższe informacje o warunkach licencji można uzyskać zapoznając się z .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License w wersji 3 .UE lub nowszej. Nie przyjmuje się ŻADNEJ ODPOWIEDZIALNOŚCI. .PP Błędy w tłumaczeniu strony podręcznika prosimy zgłaszać na adres listy dyskusyjnej .MT manpages-pl-list@lists.sourceforge.net .ME .