nss-pam-ldapd commit: r1535 - nss-pam-ldapd/tests
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1535 - nss-pam-ldapd/tests
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1535 - nss-pam-ldapd/tests
- Date: Sun, 4 Sep 2011 10:48:28 +0200 (CEST)
Author: arthur
Date: Sun Sep 4 10:48:27 2011
New Revision: 1535
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1535
Log:
warn when we couldn't get the gid or pid, the uid is the only really
interesting bit
Modified:
nss-pam-ldapd/tests/test_getpeercred.c
Modified: nss-pam-ldapd/tests/test_getpeercred.c
==============================================================================
--- nss-pam-ldapd/tests/test_getpeercred.c Sun Sep 4 10:42:12 2011
(r1534)
+++ nss-pam-ldapd/tests/test_getpeercred.c Sun Sep 4 10:48:27 2011
(r1535)
@@ -101,6 +101,11 @@
#define SOCKETNAME "/tmp/test_getpeercred.sock"
+#define assertwarn(assertion) \
+ if (!(assertion)) \
+ fprintf(stderr,"test_getpeercred: %s:%d: %s: Assertion `%s' failed\n", \
+ __FILE__, __LINE__, __ASSERT_FUNCTION, __STRING(assertion));
+
/* the main program... */
int main(int UNUSED(argc),char UNUSED(*argv[]))
{
@@ -119,8 +124,8 @@
/* look up client information */
assert(getpeercred(fsock,&uid,&gid,&pid)==0);
assert(uid==geteuid());
- assert(gid==getegid());
- assert(pid==getpid());
+ assertwarn(gid==getegid());
+ assertwarn(pid==getpid());
/* remove the socket */
unlink(SOCKETNAME);
return 0;
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits
- nss-pam-ldapd commit: r1535 - nss-pam-ldapd/tests,
Commits of the nss-pam-ldapd project