[Bug 18704] GLOB_ERR not handled correctly by glob()

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 14 Jun 2024 04:59:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=18704

Warner Losh <imp@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Open                        |Closed
         Resolution|---                         |FIXED

--- Comment #7 from Warner Losh <imp@FreeBSD.org> ---
So this bug has been fixed by other ways. The following works:

#include <err.h>
#include <glob.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
        glob_t globbuf;

        if (glob("/secretdir/*",GLOB_ERR,0,&globbuf) == 0)
                errx(1, "FAILED");
        printf("SUCCESS");
        exit(0);
}

-- 
You are receiving this mail because:
You are the assignee for the bug.