1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 int
 saf_describe_role(SAF_ParMode pmode,
                   SAF_Role *role,               /* Role to describe */
                   char **name,                  /* If non-null, on return points to malloc'd role name if any */
                   char **url                    /* If non-null, on return points to malloc'd URL if any */
                   )
 {
     SAF_ENTER(saf_describe_role, SAF_PRECONDITION_ERROR);

     if (!_saf_is_participating_proc(pmode)) SAF_RETURN(-1);
     SAF_REQUIRE(SS_ROLE(role), SAF_LOW_CHK_COST, SAF_PRECONDITION_ERROR,
                 _saf_errmsg("ROLE must be a valid role handle"));

     _saf_setupReturned_string(name, ss_string_ptr(SS_ROLE_P(role,name)));
     _saf_setupReturned_string(url, ss_string_ptr(SS_ROLE_P(role,url)));

     SAF_LEAVE(SAF_SUCCESS);
 }