diff options
Diffstat (limited to 'crypto/heimdal/appl/su/su.c')
-rw-r--r-- | crypto/heimdal/appl/su/su.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/crypto/heimdal/appl/su/su.c b/crypto/heimdal/appl/su/su.c index 79324e9..d44cf1b 100644 --- a/crypto/heimdal/appl/su/su.c +++ b/crypto/heimdal/appl/su/su.c @@ -30,6 +30,10 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* + * $FreeBSD$ + */ + #include <config.h> RCSID("$Id: su.c,v 1.26.2.1 2003/05/06 12:06:44 joda Exp $"); @@ -193,12 +197,20 @@ krb5_verify(const struct passwd *login_info, NULL); else ret = krb5_make_principal(context, &p, NULL, +#ifdef _FREEFALL_CONFIG + login_name, +#else su_info->pw_name, +#endif NULL); if(ret) return 1; - if(su_info->pw_uid != 0 || krb5_kuserok(context, p, su_info->pw_name)) { + if( +#ifndef _FREEFALL_CONFIG + su_info->pw_uid != 0 || +#endif + krb5_kuserok(context, p, su_info->pw_name)) { ret = krb5_cc_gen_new(context, &krb5_mcc_ops, &ccache); if(ret) { #if 1 @@ -430,7 +442,11 @@ main(int argc, char **argv) ok = 4; #endif - if(ok == 0 && login_info->pw_uid && verify_unix(su_info) != 0) { + if(ok == 0 && login_info->pw_uid +#ifndef _FREEFALL_CONFIG + && verify_unix(su_info) != 0 +#endif + ) { printf("Sorry!\n"); exit(1); } |