Skip to content

Commit

Permalink
Tickets: 47510 & 47543 - 389 fails to build when using Mozldap
Browse files Browse the repository at this point in the history
Backported all the mozldap fixes that applied to 1.2.11

https://fedorahosted.org/389/ticket/47510
https://fedorahosted.org/389/ticket/47543

Reviewed by: rmeggins and nhosoi(Thanks!)
  • Loading branch information
mreynolds389 committed Oct 3, 2013
1 parent 44a773d commit 847150a
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 11 deletions.
8 changes: 4 additions & 4 deletions ldap/servers/plugins/automember/automember.c
Expand Up @@ -2524,7 +2524,7 @@ void automember_map_task_thread(void *arg){
LDIFFP *ldif_fd_in = NULL;
ldif_record_lineno_t lineno = 0;
#else
PRFileDesc *ldif_fd_in = NULL;
FILE *ldif_fd_in = NULL;
int lineno = 0;
#endif
int rc = 0;
Expand Down Expand Up @@ -2555,9 +2555,9 @@ void automember_map_task_thread(void *arg){
rc = errno;
errstr = strerror(rc);
#else
if(( ldif_fd_in = PR_Open( td->ldif_in, PR_RDONLY, DEFAULT_FILE_MODE )) == NULL ){
if(( ldif_fd_in = fopen( td->ldif_in, "r")) == NULL ){
rc = PR_GetOSError();
errstr = slapi_system_strerror(rc);
errstr = (char *)slapi_system_strerror(rc);
#endif
slapi_task_log_notice(task, "The ldif file %s could not be accessed, error %d (%s). Aborting task.\n",
td->ldif_in, rc, errstr);
Expand Down Expand Up @@ -2616,7 +2616,7 @@ void automember_map_task_thread(void *arg){
#if defined(USE_OPENLDAP)
ldif_close(ldif_fd_in);
#else
PR_Close(ldif_fd_in);
fclose(ldif_fd_in);
#endif
}
slapi_task_inc_progress(task);
Expand Down
2 changes: 1 addition & 1 deletion ldap/servers/plugins/posix-winsync/posix-group-task.c
@@ -1,7 +1,7 @@
#include "slapi-plugin.h"
#include "slapi-private.h"
#include "nspr.h"

#include <string.h>
#include "posix-wsp-ident.h"
#include "posix-group-func.h"

Expand Down
1 change: 1 addition & 0 deletions ldap/servers/plugins/posix-winsync/posix-winsync.c
Expand Up @@ -63,6 +63,7 @@
#include <dirsrv/winsync-plugin.h>
#endif
#include <plstr.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include "posix-wsp-ident.h"
Expand Down
3 changes: 0 additions & 3 deletions ldap/servers/plugins/rootdn_access/rootdn_access.c
Expand Up @@ -43,9 +43,6 @@
* Root DN Access Control plug-in
*/
#include "rootdn_access.h"
#include <nspr.h>
#include <time.h>
#include <ctype.h>

/*
* Add an entry like the following to dse.ldif to enable this plugin:
Expand Down
2 changes: 2 additions & 0 deletions ldap/servers/plugins/rootdn_access/rootdn_access.h
Expand Up @@ -47,6 +47,8 @@
#include <nspr.h>
#include <time.h>
#include <ctype.h>
#include <string.h>
#include <strings.h>

#define ROOTDN_PLUGIN_SUBSYSTEM "rootdn-access-control-plugin"
#define ROOTDN_FEATURE_DESC "Root DN Access Control"
Expand Down
5 changes: 3 additions & 2 deletions ldap/servers/slapd/daemon.c
Expand Up @@ -2588,8 +2588,9 @@ slapd_bind_local_user(Connection *conn)
void
handle_closed_connection(Connection *conn)
{
ber_sockbuf_remove_io(conn->c_sb, &openldap_sockbuf_io,
LBER_SBIOD_LEVEL_PROVIDER);
#ifdef USE_OPENLDAP
ber_sockbuf_remove_io(conn->c_sb, &openldap_sockbuf_io, LBER_SBIOD_LEVEL_PROVIDER);
#endif
}

/* NOTE: this routine is not reentrant */
Expand Down
2 changes: 1 addition & 1 deletion ldap/servers/slapd/pw.c
Expand Up @@ -64,9 +64,9 @@

#include "slap.h"


#define DENY_PW_CHANGE_ACI "(targetattr = \"userPassword\") ( version 3.0; acl \"disallow_pw_change_aci\"; deny (write ) userdn = \"ldap:///self\";)"
#define GENERALIZED_TIME_LENGTH 15
#define LDAP_MOD_OP (0x0007)

static int pw_in_history(Slapi_Value **history_vals, const Slapi_Value *pw_val);
static int update_pw_history( Slapi_PBlock *pb, const Slapi_DN *sdn, char *old_pw );
Expand Down
4 changes: 4 additions & 0 deletions ldap/servers/slapd/slapi-plugin.h
Expand Up @@ -363,6 +363,10 @@ NSPR_API(PRUint32) PR_fprintf(struct PRFileDesc* fd, const char *fmt, ...)
#define LDAP_MAXINT (2147483647)
#endif

#ifndef LDAP_CANCELLED
#define LDAP_CANCELLED 0x76
#endif

/*
* Sequential access types
*/
Expand Down

0 comments on commit 847150a

Please sign in to comment.