diff options
author | Roland McGrath <roland@gnu.org> | 1998-10-20 08:38:41 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1998-10-20 08:38:41 +0000 |
commit | fc40a731d23f893be2cb7699d7e078568d4c210c (patch) | |
tree | 9f1c90570e03a7c4082bee3fca2ced1755ac98a0 /libshouldbeinlibc/ugids-verify-auth.c | |
parent | 6b0d5d23a26adea266903f285f7424a2f93863cb (diff) | |
download | hurd-fc40a731d23f893be2cb7699d7e078568d4c210c.tar.gz hurd-fc40a731d23f893be2cb7699d7e078568d4c210c.tar.bz2 hurd-fc40a731d23f893be2cb7699d7e078568d4c210c.zip |
Add braces to silence gcc warnings.
Diffstat (limited to 'libshouldbeinlibc/ugids-verify-auth.c')
-rw-r--r-- | libshouldbeinlibc/ugids-verify-auth.c | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/libshouldbeinlibc/ugids-verify-auth.c b/libshouldbeinlibc/ugids-verify-auth.c index af0ef44c..187a526c 100644 --- a/libshouldbeinlibc/ugids-verify-auth.c +++ b/libshouldbeinlibc/ugids-verify-auth.c @@ -150,38 +150,40 @@ ugids_verify_make_auth (const struct ugids *ugids, getpass_fn, getpass_hook, verify_fn, verify_hook); if (! err) - /* The user apparently has access to all the ids, try to grant the - corresponding authentication. */ - if (verify_fn) - /* Merge the authentication we got from the password server into our - result. */ - { - if (num_from > 0) - /* Use FROM as well as the passwords to get authentication. */ - err = svma_state_add_auths (&svma_state, from, num_from); - - if (! err) - { - auth_t cur_auth = getauth (); - - err = - auth_makeauth (cur_auth, - svma_state.auths, MACH_MSG_TYPE_COPY_SEND, - svma_state.num_auths, - ugids->eff_uids.ids, ugids->eff_uids.num, - ugids->avail_uids.ids, ugids->avail_uids.num, - ugids->eff_gids.ids, ugids->eff_gids.num, - ugids->avail_gids.ids, ugids->avail_gids.num, - auth); - mach_port_deallocate (mach_task_self (), cur_auth); - - /* Avoid deallocating FROM when we clean up SVMA_STATE. */ - svma_state.num_auths -= num_from; - } - } - else - /* Try to authenticate the old fashioned way... */ - err = ugids_make_auth (ugids, from, num_from, auth); + { + /* The user apparently has access to all the ids, try to grant the + corresponding authentication. */ + if (verify_fn) + /* Merge the authentication we got from the password server into our + result. */ + { + if (num_from > 0) + /* Use FROM as well as the passwords to get authentication. */ + err = svma_state_add_auths (&svma_state, from, num_from); + + if (! err) + { + auth_t cur_auth = getauth (); + + err = + auth_makeauth (cur_auth, + svma_state.auths, MACH_MSG_TYPE_COPY_SEND, + svma_state.num_auths, + ugids->eff_uids.ids, ugids->eff_uids.num, + ugids->avail_uids.ids, ugids->avail_uids.num, + ugids->eff_gids.ids, ugids->eff_gids.num, + ugids->avail_gids.ids, ugids->avail_gids.num, + auth); + mach_port_deallocate (mach_task_self (), cur_auth); + + /* Avoid deallocating FROM when we clean up SVMA_STATE. */ + svma_state.num_auths -= num_from; + } + } + else + /* Try to authenticate the old fashioned way... */ + err = ugids_make_auth (ugids, from, num_from, auth); + } if (verify_fn) /* Clean up any left over state. */ |