ids.lisp 503 B

1234567891011121314151617181920
  1. (in-package :hurd-common)
  2. (defctype uid-t :int "Represents an user ID")
  3. (defctype gid-t :int "Represents a group ID")
  4. (defun valid-id-p (id)
  5. "Checks if the ID (uid or gid) is valid."
  6. (and id
  7. (numberp id)
  8. (>= id 0)))
  9. (defconstant +uid-t-size+ (foreign-type-size 'uid-t))
  10. (defconstant +gid-t-size+ (foreign-type-size 'gid-t))
  11. ;; The CL port has some bindings to getuid, geteuid,
  12. ;; getgid, getegid, but guile itself has bindings for
  13. ;; these, so there is no need to redefine them.