.\" -*- 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 <nick@debian.org>
.\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Modified 2008-11-27 by mtk
.\"
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH getdomainname 2 "30 października 2022 r." "Linux man\-pages 6.03" 
.SH NAZWA
getdomainname, setdomainname \- pobranie/ustawienie nazwy domeny NIS
.SH BIBLIOTEKA
Standardowa biblioteka C (\fIlibc\fP, \fI\-lc\fP)
.SH SKŁADNIA
.nf
\fB#include <unistd.h>\fP
.PP
\fBint getdomainname(char *\fP\fIname\fP\fB, size_t \fP\fIlen\fP\fB);\fP
\fBint setdomainname(const char *\fP\fIname\fP\fB, size_t \fP\fIlen\fP\fB);\fP
.fi
.PP
.RS -4
Wymagane ustawienia makr biblioteki glibc (patrz \fBfeature_test_macros\fP(7)):
.RE
.PP
\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
.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"
On success, zero is returned.  On error, \-1 is returned, and \fIerrno\fP is set
to indicate the error.
.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 STANDARDY
.\" 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)
.PP
.SH TŁUMACZENIE
Autorami polskiego tłumaczenia niniejszej strony podręcznika są:
Przemek Borys <pborys@dione.ids.pl>,
Andrzej Krzysztofowicz <ankry@green.mf.pg.gda.pl>
i
Michał Kułach <michal.kulach@gmail.com>
.
.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 .