.\" -*- coding: UTF-8 -*- .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" %%%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 .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:23:25 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Mon May 27 21:37:47 1996 by Martin Schulze (joey@linux.de) .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH GETPW 3 "15. September 2017" GNU Linux\-Programmierhandbuch .SH BEZEICHNUNG getpw \- den Eintrag einer Passwortzeile rekonstruieren .SH ÜBERSICHT .nf \fB#define _GNU_SOURCE\fP /* siehe feature_test_macros(7) */ \fB#include \fP \fB#include \fP .PP \fBint getpw(uid_t \fP\fIuid\fP\fB, char *\fP\fIpuffer\fP\fB);\fP .fi .SH BESCHREIBUNG Die Funktion \fBgetpw\fP() rekonstruiert eine Zeile in der Passwortdatei im Puffer \fIpuffer\fP für die angegebene Benutzerkennung \fIuid\fP. Der zurückgegebene Puffer enthält eine Zeile im folgenden Format: .PP .in +4n .EX \fBname:passwd:uid:gid:gecos:dir:shell\fP .EE .in .PP Die Struktur \fIpasswd\fP ist in \fI\fP wie folgt definiert: .PP .in +4n .EX struct passwd { char *pw_name; /* Benutzername */ char *pw_passwd; /* Passwort des Benutzers */ uid_t pw_uid; /* Benutzerkennung */ gid_t pw_gid; /* Gruppenkennung */ char *pw_gecos; /* Benutzerinformationen */ char *pw_dir; /* Home\-Verzeichnis */ char *pw_shell; /* Anmelde\-Shell */ }; .EE .in .PP Weitere Informationen über die Felder dieser Struktur finden Sie unter \fBpasswd\fP(5). .SH RÜCKGABEWERT Die Funktion \fBgetpw\fP() gibt bei Erfolg 0 zurück. Bei einem Fehler wird \-1 zurückgegeben und \fIerrno\fP so gesetzt, dass es den Fehler anzeigt. .PP Falls \fIuid\fP nicht in der Passwortdatenbank gefunden wird, gibt \fBgetpw\fP() \-1 zurück, setzt \fIerrno\fP auf 0 und lässt \fIbuf\fP unverändert. .SH FEHLER .TP \fB0\fP oder \fBENOENT\fP Zu \fIuid\fP gibt es keinen dazugehörigen Benutzer. .TP \fBEINVAL\fP \fIpuffer\fP ist NULL. .TP \fBENOMEM\fP Der Speicher reicht nicht aus, um ihn für die Struktur \fIpasswd\fP zu reservieren. .SH DATEIEN .TP \fI/etc/passwd\fP Passwortdatenbank .SH ATTRIBUTE Siehe \fBattributes\fP(7) für eine Erläuterung der in diesem Abschnitt verwandten Ausdrücke. .TS allbox; lb lb lb l l l. Schnittstelle Attribut Wert T{ \fBgetpw\fP() T} Multithread\-Fähigkeit MT\-Safe locale .TE .sp 1 .SH "KONFORM ZU" SVr2. .SH FEHLER Die Funktion \fBgetpw\fP() ist gefährlich, da sie den bereitgestellten Puffer \fIpuffer\fP zum Überlauf bringen kann. Sie wurde durch \fBgetpwuid\fP(3) ersetzt. .SH "SIEHE AUCH" \fBendpwent\fP(3), \fBfgetpwent\fP(3), \fBgetpwent\fP(3), \fBgetpwnam\fP(3), \fBgetpwuid\fP(3), \fBputpwent\fP(3), \fBsetpwent\fP(3), \fBpasswd\fP(5) .SH KOLOPHON Diese Seite ist Teil der Veröffentlichung 4.16 des Projekts Linux\-\fIman\-pages\fP. Eine Beschreibung des Projekts, Informationen, wie Fehler gemeldet werden können sowie die aktuelle Version dieser Seite finden sich unter \%https://www.kernel.org/doc/man\-pages/. .SH ÜBERSETZUNG Die deutsche Übersetzung dieser Handbuchseite wurde von Martin Schulze und Chris Leick erstellt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die GNU General Public License Version 3 oder neuer bezüglich der Copyright-Bedingungen. Es wird KEINE HAFTUNG übernommen. Wenn Sie Fehler in der Übersetzung dieser Handbuchseite finden, schicken Sie bitte eine E-Mail an .