summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-09-30 15:07:43 +0000
committerThomas Bushnell <thomas@gnu.org>1999-09-30 15:07:43 +0000
commit09656877af9f4ed8be8e480edf4b746b4436276d (patch)
treee8be21efdf38304238037934c12936daa19193bd /libshouldbeinlibc
parentbe21a7d2e77026c5eab866b5e0b136d0f2d17bd5 (diff)
1999-09-29 Mark Kettenis <kettenis@gnu.org>
* idvec.c (idvec_setid): Switch last two arguments in call to idvec_insert_only. * idvec.h: Doc fix.
Diffstat (limited to 'libshouldbeinlibc')
-rw-r--r--libshouldbeinlibc/ChangeLog6
-rw-r--r--libshouldbeinlibc/idvec.c2
-rw-r--r--libshouldbeinlibc/idvec.h18
3 files changed, 17 insertions, 9 deletions
diff --git a/libshouldbeinlibc/ChangeLog b/libshouldbeinlibc/ChangeLog
index 14cbad6e..baaabc2a 100644
--- a/libshouldbeinlibc/ChangeLog
+++ b/libshouldbeinlibc/ChangeLog
@@ -1,3 +1,9 @@
+1999-09-29 Mark Kettenis <kettenis@gnu.org>
+
+ * idvec.c (idvec_setid): Switch last two arguments in call to
+ idvec_insert_only.
+ * idvec.h: Doc fix.
+
1999-09-27 Thomas Bushnell, BSG <tb@mit.edu>
* idvec.c (idvec_setid): Implement Posix saved set-user id
diff --git a/libshouldbeinlibc/idvec.c b/libshouldbeinlibc/idvec.c
index c9c0847b..692c4788 100644
--- a/libshouldbeinlibc/idvec.c
+++ b/libshouldbeinlibc/idvec.c
@@ -326,7 +326,7 @@ idvec_setid (struct idvec *eff, struct idvec *avail, uid_t id, int *secure)
err = idvec_add (eff, id);
if (avail->num > 0 && !err)
- err = idvec_insert_only (avail, id, 1);
+ err = idvec_insert_only (avail, 1, id);
if (err)
return err;
diff --git a/libshouldbeinlibc/idvec.h b/libshouldbeinlibc/idvec.h
index d0ec57b9..621dfba6 100644
--- a/libshouldbeinlibc/idvec.h
+++ b/libshouldbeinlibc/idvec.h
@@ -1,6 +1,6 @@
/* Routines for vectors of uids/gids
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -138,17 +138,19 @@ int idvec_remove (struct idvec *idvec, unsigned pos, uid_t id);
/* Deleted the id at position POS in IDVEC. */
void idvec_delete (struct idvec *idvec, unsigned pos);
-/* Insert ID at position POS in IDVEC, remoint any instances of ID previously
+/* Insert ID at position POS in IDVEC, remove any instances of ID previously
present at POS or after. ENOMEM is returned if there's not enough memory,
otherwise 0. */
error_t idvec_insert_only (struct idvec *idvec, unsigned pos, uid_t id);
-/* EFF and AVAIL should be idvec's corresponding to a process's effective and
- available ids. ID replaces the first id in EFF, and what it replaces is
- preserved by adding it to AVAIL (if not already present). If SECURE is
- non-NULL, and ID was not previously present in either EFF or AVAIL, then
- *SECURE is set to true. ENOMEM is returned if a malloc fails, otherwise
- 0. The return parameters are only touched if this call succeeds. */
+/* EFF and AVAIL should be idvec's corresponding to a process's
+ effective and available ids. ID replaces the first id in EFF, and,
+ if there are any IDs in AVAIL, replaces the second ID in AVAIL;
+ what it replaces in any case is preserved by adding it to AVAIL if
+ not already present. In addition, the If SECURE is non-NULL, and
+ ID was not previously present in either EFF or AVAIL, then *SECURE
+ is set to true. ENOMEM is returned if a malloc fails, otherwise 0.
+ The return parameters are only touched if this call succeeds. */
error_t idvec_setid (struct idvec *eff, struct idvec *avail, uid_t id,
int *secure);