[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20010226: No permission to write VG file (fwd)




Scott and Steve,

I have a small change in the nmaplib/pgen/nmap_pgfilw.c routine
pgfilw_checkPerms regarding the use of types.h.


The uid and gid variables for determining file permissions are
defined as short in the code, but some sites have IDs that exceed 
these limits. The result is not obtaining permission to
read and/or write vgf files.

The uid and gid type defs are actually set in sys/types.h
as uid_t and gid_t for getuid() and getgid() as well
as the struct stat.st_uid/st_gid.

The changes are:

    static uid_t        uid;
    static gid_t        gid;

and

    if (need_ids) {
        uid = getuid ();
        gid = getgid ();
        need_ids = FALSE;
    }


This change will allow the comparisons to be consistent for each OS.

Steve

------------------------------------


Steve Chiswell
Unidata User Support