*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.140 2005/02/26 18:43:33 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.141 2005/06/21 01:20:09 neilc Exp $
*
*-------------------------------------------------------------------------
*/
token = lfirst(line_item);
file_map = token;
- /* Get the ident user token (must be provided) */
+ /* Get the ident user token */
line_item = lnext(line_item);
- if (!line)
+ if (!line_item)
goto ident_syntax;
token = lfirst(line_item);
file_ident_user = token;
/* Get the PG username token */
line_item = lnext(line_item);
- if (!line)
+ if (!line_item)
goto ident_syntax;
token = lfirst(line_item);
file_pguser = token;
strcmp(file_pguser, pg_user) == 0 &&
strcmp(file_ident_user, ident_user) == 0)
*found_p = true;
+
return;
ident_syntax:
- if (line_item)
- ereport(LOG,
- (errcode(ERRCODE_CONFIG_FILE_ERROR),
- errmsg("invalid entry in file \"%s\" at line %d, token \"%s\"",
- IdentFileName, line_number,
- (const char *) lfirst(line_item))));
- else
- ereport(LOG,
- (errcode(ERRCODE_CONFIG_FILE_ERROR),
- errmsg("missing entry in file \"%s\" at end of line %d",
- IdentFileName, line_number)));
-
+ ereport(LOG,
+ (errcode(ERRCODE_CONFIG_FILE_ERROR),
+ errmsg("missing entry in file \"%s\" at end of line %d",
+ IdentFileName, line_number)));
*error_p = true;
}