Skip to content
  • Colin Walters's avatar
    pkcheck: Support --process=pid,start-time,uid syntax too · 3968411b
    Colin Walters authored
    The uid is a new addition; this allows callers such as libvirt to
    close a race condition in reading the uid of the process talking to
    them.  They can read it via getsockopt(SO_PEERCRED) or equivalent,
    rather than having pkcheck look at /proc later after the fact.
    
    Programs which invoke pkcheck but need to know beforehand (i.e.  at
    compile time) whether or not it supports passing the uid can
    use:
    
    pkcheck_supports_uid=$($PKG_CONFIG --variable pkcheck_supports_uid polkit-gobject-1)
    test x$pkcheck_supports_uid = xyes
    3968411b