Comment utiliser le serveur de mots de passe getauth.c int main (int argc, char *argv []) { error_t err; mach_port_t password_server, msgport; auth_t auth; process_t proc_server = getproc (); password_server = file_name_lookup (_SERVERS_PASSWORD, 0, 0); if (password_server == MACH_PORT_NULL) error (1, 0, "Failed to obtain a port to the password server"); err = password_check_user (password_server, atoi (argv[1]), argv[2], &auth); if (err == EACCES) error (1, err, "Invalid password"); if (err) error (1, err, "Authentication failure"); err = proc_getmsgport (proc_server, getppid (), &msgport); if (err) error (1, err, "Cannot get parent's message port"); err = msg_add_auth (msgport, auth); if (err) error (1, err, "Failed to add authorization to parent"); return 0; }