summaryrefslogtreecommitdiff
path: root/pwd
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:06:20 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:06:58 +0000
commit3fcbb67b7949a8b362de5558bf1c6dd7ec5d21cf (patch)
treeb867f9a6d3426f212b2f073bef8067a830f13022 /pwd
parentb6df7ac2cbe11e6a72f2ab7bd35c6130b72d21d9 (diff)
parentcab56836b146bc129f1ad43f0393d95a9deca63a (diff)
Merge commit 'refs/top-bases/t/tls-threadvar' into t/tls-threadvar
Diffstat (limited to 'pwd')
-rw-r--r--pwd/Makefile10
-rw-r--r--pwd/fgetpwent.c2
-rw-r--r--pwd/fgetpwent_r.c2
-rw-r--r--pwd/getpw.c2
-rw-r--r--pwd/getpwent.c2
-rw-r--r--pwd/getpwent_r.c2
-rw-r--r--pwd/getpwnam.c2
-rw-r--r--pwd/getpwnam_r.c2
-rw-r--r--pwd/getpwuid.c2
-rw-r--r--pwd/getpwuid_r.c2
-rw-r--r--pwd/putpwent.c2
-rw-r--r--pwd/pwd.h34
-rw-r--r--pwd/tst-getpw.c2
-rw-r--r--pwd/tst-putpwent.c2
14 files changed, 34 insertions, 34 deletions
diff --git a/pwd/Makefile b/pwd/Makefile
index 5c7f6a2da1..698578acf2 100644
--- a/pwd/Makefile
+++ b/pwd/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2016 Free Software Foundation, Inc.
+# Copyright (C) 1991-2018 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -34,9 +34,9 @@ include ../Rules
ifeq ($(have-thread-library),yes)
-CFLAGS-getpwent_r.c = -fexceptions
-CFLAGS-getpwent.c = -fexceptions
-CFLAGS-getpw.c = -fexceptions
-CFLAGS-fgetpwent_r.c = $(libio-mtsafe)
+CFLAGS-getpwent_r.c += -fexceptions
+CFLAGS-getpwent.c += -fexceptions
+CFLAGS-getpw.c += -fexceptions
+CFLAGS-fgetpwent_r.c += $(libio-mtsafe)
endif
diff --git a/pwd/fgetpwent.c b/pwd/fgetpwent.c
index 811b008738..7601857ee6 100644
--- a/pwd/fgetpwent.c
+++ b/pwd/fgetpwent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/pwd/fgetpwent_r.c b/pwd/fgetpwent_r.c
index ea8c7e0153..ec21739b76 100644
--- a/pwd/fgetpwent_r.c
+++ b/pwd/fgetpwent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/pwd/getpw.c b/pwd/getpw.c
index 0c4b5a396d..7b324c9b8a 100644
--- a/pwd/getpw.c
+++ b/pwd/getpw.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/pwd/getpwent.c b/pwd/getpwent.c
index fa8d340ade..14f2b46d46 100644
--- a/pwd/getpwent.c
+++ b/pwd/getpwent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/pwd/getpwent_r.c b/pwd/getpwent_r.c
index 375900c7cd..69d040e1c5 100644
--- a/pwd/getpwent_r.c
+++ b/pwd/getpwent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/pwd/getpwnam.c b/pwd/getpwnam.c
index 472ac69cdc..ec0f45b53c 100644
--- a/pwd/getpwnam.c
+++ b/pwd/getpwnam.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/pwd/getpwnam_r.c b/pwd/getpwnam_r.c
index 0816bb5a67..2a208f4f54 100644
--- a/pwd/getpwnam_r.c
+++ b/pwd/getpwnam_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/pwd/getpwuid.c b/pwd/getpwuid.c
index 9d3f2939a9..51f2f417b8 100644
--- a/pwd/getpwuid.c
+++ b/pwd/getpwuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/pwd/getpwuid_r.c b/pwd/getpwuid_r.c
index b998e0c60e..d800fbe8fa 100644
--- a/pwd/getpwuid_r.c
+++ b/pwd/getpwuid_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/pwd/putpwent.c b/pwd/putpwent.c
index 0df60c4480..ba4bd2b210 100644
--- a/pwd/putpwent.c
+++ b/pwd/putpwent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/pwd/pwd.h b/pwd/pwd.h
index 07455e7e69..e6d20cd78b 100644
--- a/pwd/pwd.h
+++ b/pwd/pwd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,11 +45,12 @@ typedef __uid_t uid_t;
# endif
#endif
-/* The passwd structure. */
+/* A record in the user database. */
struct passwd
{
char *pw_name; /* Username. */
- char *pw_passwd; /* Password. */
+ char *pw_passwd; /* Hashed passphrase, if shadow database
+ not in use (see shadow.h). */
__uid_t pw_uid; /* User ID. */
__gid_t pw_gid; /* Group ID. */
char *pw_gecos; /* Real name. */
@@ -59,25 +60,24 @@ struct passwd
#ifdef __USE_MISC
-# define __need_FILE
-# include <stdio.h>
+# include <bits/types/FILE.h>
#endif
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-/* Rewind the password-file stream.
+/* Rewind the user database stream.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern void setpwent (void);
-/* Close the password-file stream.
+/* Close the user database stream.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern void endpwent (void);
-/* Read an entry from the password-file stream, opening it if necessary.
+/* Read an entry from the user database stream, opening it if necessary.
This function is a possible cancellation point and therefore not
marked with __THROW. */
@@ -85,7 +85,7 @@ extern struct passwd *getpwent (void);
#endif
#ifdef __USE_MISC
-/* Read an entry from STREAM.
+/* Read a user database entry from STREAM.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
@@ -93,7 +93,7 @@ extern struct passwd *getpwent (void);
therefore not marked with __THROW. */
extern struct passwd *fgetpwent (FILE *__stream) __nonnull ((1));
-/* Write the given entry onto the given stream.
+/* Write a given user database entry onto the given stream.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
@@ -103,13 +103,13 @@ extern int putpwent (const struct passwd *__restrict __p,
FILE *__restrict __f);
#endif
-/* Search for an entry with a matching user ID.
+/* Retrieve the user database entry for the given user ID.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern struct passwd *getpwuid (__uid_t __uid);
-/* Search for an entry with a matching username.
+/* Retrieve the user database entry for the given username.
This function is a possible cancellation point and therefore not
marked with __THROW. */
@@ -156,8 +156,8 @@ extern int getpwnam_r (const char *__restrict __name,
# ifdef __USE_MISC
-/* Read an entry from STREAM. This function is not standardized and
- probably never will.
+/* Read a user database entry from STREAM. This function is not
+ standardized and probably never will.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
@@ -173,9 +173,9 @@ extern int fgetpwent_r (FILE *__restrict __stream,
#endif /* POSIX or reentrant */
#ifdef __USE_GNU
-/* Re-construct the password-file line for the given uid
- in the given buffer. This knows the format that the caller
- will expect, but this need not be the format of the password file.
+/* Write a traditional /etc/passwd line, based on the user database
+ entry for the given UID, to BUFFER; space for BUFFER must be
+ allocated by the caller.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
diff --git a/pwd/tst-getpw.c b/pwd/tst-getpw.c
index 069d1d0593..52c1686b96 100644
--- a/pwd/tst-getpw.c
+++ b/pwd/tst-getpw.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/pwd/tst-putpwent.c b/pwd/tst-putpwent.c
index 0e5547cd43..28253e75e1 100644
--- a/pwd/tst-putpwent.c
+++ b/pwd/tst-putpwent.c
@@ -1,5 +1,5 @@
/* Test for processing of invalid passwd entries. [BZ #18724]
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or