]> granicus.if.org Git - shadow/commitdiff
* libmisc/setugid.c: Updated comments.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 20 Apr 2009 11:43:36 +0000 (11:43 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 20 Apr 2009 11:43:36 +0000 (11:43 +0000)
ChangeLog
libmisc/setugid.c

index 03b532688aaaa2075d8225d018c15b326332f7a9..6986e898d4571474cc8569a2e8fc8f6e8c7b90ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-20  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * libmisc/setugid.c: Updated comments.
+
 2009-04-20  Nicolas François  <nicolas.francois@centraliens.net>
 
        * libmisc/failure.h, libmisc/failure.c, src/login.c: Added
index 80c5f6dc9a26b42cc84a27fb939446f05d29c905..997095e9b81cb21ee0f7b1016d085c80bdb051fe 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1989 - 1994, Julianne Frances Haugh
  * Copyright (c) 1996 - 1998, Marek Michałkiewicz
  * Copyright (c) 2003 - 2005, Tomasz Kłoczko
- * Copyright (c) 2008       , Nicolas François
+ * Copyright (c) 2008 - 2009, Nicolas François
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 #include "defines.h"
 #include <pwd.h>
 #include "getdef.h"
+
 /*
- * setup_uid_gid() split in two functions for PAM support -
- * pam_setcred() needs to be called after initgroups(), but
- * before setuid().
+ * setup_groups - set the group credentials
+ *     set the group ID to the value from the password file entry
+ *     set the supplementary group IDs
+ *
+ * In case of PAM enabled configurations, this shall be called before
+ * pam_setcred.
+ *
+ * Returns 0 on success, or -1 on failure.
  */
 int setup_groups (const struct passwd *info)
 {
@@ -81,6 +87,11 @@ int setup_groups (const struct passwd *info)
        return 0;
 }
 
+/*
+ * change_uid - Set the real UID
+ *
+ * Returns 0 on success, or -1 on failure.
+ */
 int change_uid (const struct passwd *info)
 {
        /*