summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-03-26 01:08:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:17 -0500
commit5ae38fb963cf1907043129b4d423c7bc8fe18fb1 (patch)
tree2b7aea4ee1bd3a43048c217dddd2b14de2e2fc09 /source4/lib
parent747eb74d2e68745bc817d6f5713915ae63137ee2 (diff)
downloadsamba-5ae38fb963cf1907043129b4d423c7bc8fe18fb1.tar.gz
samba-5ae38fb963cf1907043129b4d423c7bc8fe18fb1.tar.bz2
samba-5ae38fb963cf1907043129b4d423c7bc8fe18fb1.zip
r6070: Fix typo's and fallback to "" as default user name if no
other username could be guessed. (This used to be commit 7fe77cd65901776b5a78e8398547f364379259d3)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/credentials.c5
-rw-r--r--source4/lib/socket/socket_unix.c1
2 files changed, 3 insertions, 3 deletions
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;
diff --git a/source4/lib/socket/socket_unix.c b/source4/lib/socket/socket_unix.c
index 7cf12db4b2..614229aaac 100644
--- a/source4/lib/socket/socket_unix.c
+++ b/source4/lib/socket/socket_unix.c
@@ -23,7 +23,6 @@
#include "includes.h"
#include "lib/socket/socket.h"
-#include "lib/socket/socket.h"
#include "system/network.h"
#include "system/filesys.h"