FreeBSD/contrib/openbsm/libauditd/auditd_lib.c
/*
 * Concat the directory name to the given file name.
 * XXX We should affix the hostname also
 */
Concat the directory name to the given file name.
XXX We should affix the hostname also
Concat the directory name to the given file name . XXX We should affix the hostname also
static char *
affixdir(char *name, struct dir_ent *dirent)
{
	char *fn = NULL;
	if (strlen(name) != FILENAME_LEN) {
		errno = EINVAL;
		return (NULL);
	}
	if (auditd_hostlen != -1)
		asprintf(&fn, "%s/%s.%s", dirent->dirname, name, auditd_host);
	else
		asprintf(&fn, "%s/%s", dirent->dirname, name);
	return (fn);
}
static char * affixdir ( char * name , struct dir_ent * dirent ) { char * fn = NULL ; if ( strlen ( name ) != FILENAME_LEN ) { errno = EINVAL ; return ( NULL ) ; } if ( auditd_hostlen != -1 ) asprintf ( & fn , " " , dirent -> dirname , name , auditd_host ) ; else asprintf ( & fn , " " , dirent -> dirname , name ) ; return ( fn ) ; }
Concat the directory name to the given file name.
Concat the directory name to the given file name .
/*
	 * Sanity check on file name.
	 */ /*
	 * If the host is set then also add the hostname to the filename.
	 */