2N/A * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * $Id: plain.c,v 1.61 2003/03/26 17:18:04 rjs3 Exp $ 2N/A * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved. 2N/A * Redistribution and use in source and binary forms, with or without 2N/A * modification, are permitted provided that the following conditions 2N/A * 1. Redistributions of source code must retain the above copyright 2N/A * notice, this list of conditions and the following disclaimer. 2N/A * 2. Redistributions in binary form must reproduce the above copyright 2N/A * notice, this list of conditions and the following disclaimer in 2N/A * the documentation and/or other materials provided with the 2N/A * 3. The name "Carnegie Mellon University" must not be used to 2N/A * endorse or promote products derived from this software without 2N/A * prior written permission. For permission or any other legal 2N/A * details, please contact 2N/A * Office of Technology Transfer 2N/A * Carnegie Mellon University 2N/A * 5000 Forbes Avenue 2N/A * Pittsburgh, PA 15213-3890 2N/A * (412) 268-4387, fax: (412) 268-7395 2N/A * tech-transfer@andrew.cmu.edu 2N/A * 4. Redistributions of any form whatsoever must retain the following 2N/A * "This product includes software developed by Computing Services 2N/A * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO 2N/A * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 2N/A * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE 2N/A * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 2N/A * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 2N/A * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 2N/A * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 2N/A#
endif /* !_SUN_SDK_ */ 2N/A/***************************** Common Section *****************************/ 2N/A#
endif /* !_SUN_SDK_ */ 2N/A/***************************** Server Section *****************************/ 2N/A /* holds state are in */ 2N/A /* should have received author-id NUL authen-id NUL password */ 2N/A "Can only find author (no password)");
2N/A#
endif /* _SUN_SDK_ */ 2N/A#
endif /* _SUN_SDK_ */ 2N/A "Got more data than we were expecting in the PLAIN plugin");
2N/A "Got more data than we were expecting in the PLAIN plugin\n");
2N/A#
endif /* _SUN_SDK_ */ 2N/A /* this kinda sucks. we need password to be null terminated 2N/A but we can't assume there is an allocated byte at the end 2N/A of password so we have to copy it */ 2N/A /* Canonicalize userid first, so that password verification is only 2N/A * against the canonical id */ 2N/A /* verify password - return sasl_ok on success*/ 2N/A "Password verification failed");
2N/A#
endif /* _INTEGRATED_SOLARIS_ */ 2N/A /* Canonicalize and store the authorization ID */ 2N/A /* We need to do this after calling verify_user just in case verify_user 2N/A * needed to get auxprops itself */ 2N/A "PLAIN",
/* mech_name */ 2N/A/***************************** Client Section *****************************/ 2N/A#
endif /* _INTEGRATED_SOLARIS_ */ 2N/A /* holds state are in */ 2N/A /* doesn't really matter how the server responds */ 2N/A /* check if sec layer strong enough */ 2N/A#
endif /* _INTEGRATED_SOLARIS_ */ 2N/A /* try to get the authid */ 2N/A /* try to get the userid */ 2N/A /* try to get the password */ 2N/A /* free prompts we got */ 2N/A /* if there are prompts not filled in */ 2N/A /* make the prompt list */ 2N/A "Please enter your authorization name" :
NULL,
2N/A "Please enter your authentication name" :
NULL,
2N/A#
endif /* _INTEGRATED_SOLARIS_ */ 2N/A /* send authorized id NUL authentication id NUL password */ 2N/A /* remember the extra NUL on the end for stupid clients */ 2N/A /* free sensitive info */ 2N/A#
endif /* _INTEGRATED_SOLARIS_ */ 2N/A "PLAIN",
/* mech_name */