From 5ae38fb963cf1907043129b4d423c7bc8fe18fb1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 26 Mar 2005 01:08:59 +0000 Subject: r6070: Fix typo's and fallback to "" as default user name if no other username could be guessed. (This used to be commit 7fe77cd65901776b5a78e8398547f364379259d3) --- source4/lib/credentials.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/lib/credentials.c') diff --git a/source4/lib/credentials.c b/source4/lib/credentials.c index da0bc4236f..167650f8c2 100644 --- a/source4/lib/credentials.c +++ b/source4/lib/credentials.c @@ -29,7 +29,7 @@ /* Create a new credentials structure, on the specified TALLOC_CTX */ struct cli_credentials *cli_credentials_init(TALLOC_CTX *mem_ctx) { - struct cli_credentails *cred = talloc_zero(mem_ctx, struct cli_credentials); + struct cli_credentials *cred = talloc_zero(mem_ctx, struct cli_credentials); if (!cred) { return cred; } @@ -311,6 +311,7 @@ void cli_credentials_guess(struct cli_credentials *cred) { char *p; + cli_credentials_set_username(cred, "", CRED_GUESSED); cli_credentials_set_conf(cred); if (getenv("LOGNAME")) { @@ -455,7 +456,7 @@ BOOL cli_credentials_is_anonymous(struct cli_credentials *cred) const char *username = cli_credentials_get_username(cred); /* Yes, it is deliberate that we die if we have a NULL pointer - * here - anymous is "", not NULL, which is 'never specified, + * here - anonymous is "", not NULL, which is 'never specified, * never guessed', ie programmer bug */ if (!username[0]) return True; -- cgit