[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: bogus cast in daemon.c, breaks LDAPI (ITS#863)



Fixed in HEAD and OPENLDAP_REL_ENG_2, please test.

Thanks, Kurt

At 11:55 PM 10/28/00 +0000, n@nectar.com wrote:
>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) );