[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
bogus cast in daemon.c, breaks LDAPI (ITS#863)
Full_Name: Jacques Vidrine
Version: 2.0.6
OS: FreeBSD 4
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (208.42.49.153)
A bad cast causes chmod() to fail when using LDAPI.
@@ -422,7 +454,7 @@
switch ( sai->ai_family ) {
# ifdef LDAP_PF_LOCAL
case AF_LOCAL:
- if ( chmod( (char *)sai->ai_addr, S_IRWXU ) < 0 ) {
+ if ( chmod( (char *)sai->ai_addr->sa_data, S_IRWXU ) < 0 ) {
int err = sock_errno();
Debug( LDAP_DEBUG_ANY, "daemon: fchmod(%ld) failed
errno=%d (%s)",
(long) l.sl_sd, err, sock_errstr(err) );