Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 312602 Details for
Bug 456456
There is no way to tell apart an unauthenticated bind from an anonymous bind
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Plugin to disable unauthenticated binds
disunauth.c (text/plain), 1.71 KB, created by
Loris Santamaria
on 2008-07-24 22:09:06 UTC
(
hide
)
Description:
Plugin to disable unauthenticated binds
Filename:
MIME Type:
Creator:
Loris Santamaria
Created:
2008-07-24 22:09:06 UTC
Size:
1.71 KB
patch
obsolete
>#include <stdio.h> >#include <string.h> >#include "slapi-plugin.h" > >Slapi_PluginDesc preoppdesc = { "disable-unauth", "Loris Santamaria", "0.01", > "disable unauthenticated binds" }; > >/* Pre-operation plug-in function */ >int >disunauth_bind( Slapi_PBlock *pb ) >{ > char *dn; > struct berval *pw; > int method; > > if ( slapi_pblock_get( pb, SLAPI_BIND_TARGET, &dn ) != 0 || > slapi_pblock_get( pb, SLAPI_BIND_CREDENTIALS, &pw ) != 0 || > slapi_pblock_get( pb, SLAPI_BIND_METHOD, &method ) != 0 ) { > slapi_log_error( SLAPI_LOG_PLUGIN, > "disunauth_bind", "Could not get parameters\n" ); > return( -1 ); > } > if ( method == LDAP_AUTH_SIMPLE && strlen(pw->bv_val) == 0 ) { > /* There is a DN but no password */ > slapi_send_ldap_result(pb, LDAP_UNWILLING_TO_PERFORM, > NULL, "Unauthenticated binds not allowed", > 0, NULL); > return ( 1 ); > } > > return( 0 ); /* allow the operation to continue */ >} > >/* Initialization function */ >#ifdef _WIN32 >__declspec(dllexport) >#endif >int >disunauth_init( Slapi_PBlock *pb ) >{ > if ( slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION, > SLAPI_PLUGIN_VERSION_01 ) != 0 || > slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION, > (void *)&preoppdesc ) != 0 || > slapi_pblock_set( pb, SLAPI_PLUGIN_PRE_BIND_FN, > (void *) disunauth_bind ) != 0 ) { > slapi_log_error( SLAPI_LOG_PLUGIN, "disunauth_init", > "Failed to set version and function\n" ); > return( -1 ); > } > > return( 0 ); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 456456
: 312602