apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44129] New: - apr_os_dir_put() does not allocate an entry buffer and fails in apr_stat() due to missing dirname
Date Sat, 22 Dec 2007 06:50:51 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44129>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44129

           Summary: apr_os_dir_put() does not allocate an entry buffer and
                    fails in apr_stat() due to missing dirname
           Product: APR
           Version: HEAD
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: iwade@optusnet.com.au


apr_os_dir_put() does not allocate an entry buffer, this is a bug plain and simple.

If it were to allocate that buffer, it would subsequently be unable to call apr_stat() on
directory entries if 
the user requests more than name/type/inode because the dirname field is missing.

apr_os_dir_put() does not register a cleanup handler, which would be desirable behaviour in
an 
application which aims to pass ownership of a dirhandle to APR.

I have an application which would like to "break out" the apr_stat() that apr_dir_read() does
for specialty 
reasons. To do this I pass in empty wanted flags, but to be able to call apr_stat() in a similar
way myself 
I needed to add apr_dir_name_get() and apr_dir_pool_get().

I have attached a patch against trunk which:

a/ adds apr_os_dir_put_ex() which accepts two additional arguments:
    1/ dirname
    2/ flags - support for APR_DIR_NOCLEANUP (defined with the same value as APR_FILE_NOCLEANUP)
b/ re-factor apr_dir_open() and apr_os_dir_put() functions to call apr_os_dir_put_ex() internally.
c/ adds two new straight-forward functitons:
    1/ apr_dir_name_get()
    2/ apr_dir_pool_get()

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message