* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define RCSID "$Id: auth.c,v 1.92 2003/02/16 22:29:50 paulus Exp $"
+#define RCSID "$Id: auth.c,v 1.93 2003/03/03 05:11:45 paulus Exp $"
#include <stdio.h>
#include <stddef.h>
/* get username */
if (fgets(u, MAXNAMELEN - 1, ufile) == NULL
- || fgets(p, MAXSECRETLEN - 1, ufile) == NULL){
+ || fgets(p, MAXSECRETLEN - 1, ufile) == NULL) {
+ fclose(ufile);
option_error("unable to read user login data file %s", fname);
return 0;
}
exit(1);
}
+
+ /*
+ * Early check for remote number authorization.
+ */
+ if (!auth_number()) {
+ warn("calling number %q is not authorized", remote_number);
+ exit(EXIT_CNID_AUTH_FAILED);
+ }
}
/*