ports/security/sssd/files/patch-src__sss_client__common.c
Ryan Steinmetz 2e567b748d New port: security/sssd
sssd integrates the functionality of pam_krb5 and pam_ldap/nss_ldap
with caching and additional features.

This project provides a set of daemons to manage access to remote
directories and authentication mechanisms, it provides an NSS and
PAM interface toward the system and a pluggable backend system to
connect to multiple different account sources. It is also the
basis to provide client auditing and policy services for projects
like FreeIPA.  sssd also features caching, which can allow for
offline use to assist laptop users.

WWW: https://fedorahosted.org/sssd/

PR:		ports/161555
Submitted by:	Andrew Elble <aweits@rit.edu>
2011-10-15 02:13:20 +00:00

63 lines
1.7 KiB
C

--- ./src/sss_client/common.c.orig 2011-08-29 11:39:05.000000000 -0400
+++ ./src/sss_client/common.c 2011-10-13 12:15:03.000000000 -0400
@@ -26,6 +26,7 @@
#include "config.h"
#include <nss.h>
+#include <nsswitch.h>
#include <security/pam_modules.h>
#include <errno.h>
#include <sys/types.h>
@@ -111,7 +112,6 @@
*errnop = error;
break;
case 0:
- *errnop = ETIME;
break;
case 1:
if (pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) {
@@ -216,7 +216,6 @@
*errnop = error;
break;
case 0:
- *errnop = ETIME;
break;
case 1:
if (pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) {
@@ -638,7 +637,6 @@
*errnop = error;
break;
case 0:
- *errnop = ETIME;
break;
case 1:
if (pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) {
@@ -688,23 +686,23 @@
/* avoid looping in the nss daemon */
envval = getenv("_SSS_LOOPS");
if (envval && strcmp(envval, "NO") == 0) {
- return NSS_STATUS_NOTFOUND;
+ return NS_NOTFOUND;
}
ret = sss_cli_check_socket(errnop, SSS_NSS_SOCKET_NAME);
if (ret != SSS_STATUS_SUCCESS) {
- return NSS_STATUS_UNAVAIL;
+ return NS_UNAVAIL;
}
ret = sss_cli_make_request_nochecks(cmd, rd, repbuf, replen, errnop);
switch (ret) {
case SSS_STATUS_TRYAGAIN:
- return NSS_STATUS_TRYAGAIN;
+ return NS_TRYAGAIN;
case SSS_STATUS_SUCCESS:
- return NSS_STATUS_SUCCESS;
+ return NS_SUCCESS;
case SSS_STATUS_UNAVAIL:
default:
- return NSS_STATUS_UNAVAIL;
+ return NS_UNAVAIL;
}
}