[Pkg-shadow-commits] r2717 - in upstream/trunk: . libmisc
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Mon Apr 20 11:43:36 UTC 2009
Author: nekral-guest
Date: 2009-04-20 11:43:36 +0000 (Mon, 20 Apr 2009)
New Revision: 2717
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/setugid.c
Log:
* libmisc/setugid.c: Updated comments.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2009-04-20 11:39:16 UTC (rev 2716)
+++ upstream/trunk/ChangeLog 2009-04-20 11:43:36 UTC (rev 2717)
@@ -1,5 +1,9 @@
2009-04-20 Nicolas François <nicolas.francois at centraliens.net>
+ * libmisc/setugid.c: Updated comments.
+
+2009-04-20 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/failure.h, libmisc/failure.c, src/login.c: Added
username as first parameter of failtmp to avoid issues with
non-null terminated ut_user, unavailability of ut_user, incomplete
Modified: upstream/trunk/libmisc/setugid.c
===================================================================
--- upstream/trunk/libmisc/setugid.c 2009-04-20 11:39:16 UTC (rev 2716)
+++ upstream/trunk/libmisc/setugid.c 2009-04-20 11:43:36 UTC (rev 2717)
@@ -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
@@ -45,10 +45,16 @@
#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 @@
return 0;
}
+/*
+ * change_uid - Set the real UID
+ *
+ * Returns 0 on success, or -1 on failure.
+ */
int change_uid (const struct passwd *info)
{
/*
More information about the Pkg-shadow-commits
mailing list