openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/nss-pam-ldapd/0.9.8-r0/nss-pam-ldapd-0.9.8/nslcd/nslcd.c
static void mkdirname(const char* filename)
{
    char *tmpname, *path;
    tmpname = strdup(filename);
    if (tmpname == NULL)
        return;
    path = dirname(tmpname);
    if (mkdir(path, (mode_t)0755) == 0)
    {
        /* if directory was just created, set correct ownership */
        if (lchown(path, nslcd_cfg->uid, nslcd_cfg->gid) < 0)
            log_log(LOG_WARNING, "problem setting permissions for %s: %s", path,
                    strerror(errno));
    }
    free(tmpname);
}
/* create the directory for the specified file to reside in */
create the directory for the specified file to reside in
create the directory for the specified file to reside in
static void mkdirname(const char* filename)
{
    char *tmpname, *path;
    tmpname = strdup(filename);
    if (tmpname == NULL)
        return;
    path = dirname(tmpname);
    if (mkdir(path, (mode_t)0755) == 0)
    {
        if (lchown(path, nslcd_cfg->uid, nslcd_cfg->gid) < 0)
            log_log(LOG_WARNING, "problem setting permissions for %s: %s", path,
                    strerror(errno));
    }
    free(tmpname);
}
static void mkdirname ( const char * filename ) { char * tmpname , * path ; tmpname = strdup ( filename ) ; if ( tmpname == NULL ) return ; path = dirname ( tmpname ) ; if ( mkdir ( path , ( mode_t ) 0755 ) == 0 ) { if ( lchown ( path , nslcd_cfg -> uid , nslcd_cfg -> gid ) < 0 ) log_log ( LOG_WARNING , " " , path , strerror ( errno ) ) ; } free ( tmpname ) ; }
create the directory for the specified file to reside in
create the directory for the specified file to reside in
/* if directory was just created, set correct ownership */