summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/auth/auth_util.c8
-rw-r--r--source/lib/ldap_escape.c4
-rw-r--r--source/libsmb/clispnego.c4
-rw-r--r--source/nsswitch/winbindd.c2
-rw-r--r--source/passdb/pdb_smbpasswd.c2
-rwxr-xr-xsource/script/installbin.sh.in1
-rwxr-xr-xsource/script/uninstallbin.sh.in1
7 files changed, 13 insertions, 9 deletions
diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index f4d32ebdc0c..43ae5c1af65 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -1243,10 +1243,9 @@ NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info,
}
result = make_server_info(NULL);
-
- if (!NT_STATUS_IS_OK(status)) {
+ if (result == NULL) {
TALLOC_FREE(sampass);
- return status;
+ return NT_STATUS_NO_MEMORY;
}
result->sam_account = sampass;
@@ -1279,8 +1278,7 @@ NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info,
Make (and fill) a user_info struct for a guest login.
This *must* succeed for smbd to start. If there is no mapping entry for
the guest gid, then create one.
-**********************
-*****************************************************/
+***************************************************************************/
static NTSTATUS make_new_server_info_guest(auth_serversupplied_info **server_info)
{
diff --git a/source/lib/ldap_escape.c b/source/lib/ldap_escape.c
index 3feb0e0c44e..fcb787e9e85 100644
--- a/source/lib/ldap_escape.c
+++ b/source/lib/ldap_escape.c
@@ -40,6 +40,10 @@ char *escape_ldap_string_alloc(const char *s)
const char *sub;
int i = 0;
char *p = output;
+
+ if (output == NULL) {
+ return NULL;
+ }
while (*s)
{
diff --git a/source/libsmb/clispnego.c b/source/libsmb/clispnego.c
index 13bf1a866c9..e87e9f0c7c9 100644
--- a/source/libsmb/clispnego.c
+++ b/source/libsmb/clispnego.c
@@ -140,7 +140,7 @@ BOOL spnego_parse_negTokenInit(DATA_BLOB blob,
asn1_start_tag(&data,ASN1_CONTEXT(0));
asn1_start_tag(&data,ASN1_SEQUENCE(0));
- for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS; i++) {
+ for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS-1; i++) {
char *oid_str = NULL;
asn1_read_OID(&data,&oid_str);
OIDs[i] = oid_str;
@@ -229,7 +229,7 @@ BOOL parse_negTokenTarg(DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], DATA_BLOB *se
asn1_start_tag(&data, ASN1_CONTEXT(0));
asn1_start_tag(&data, ASN1_SEQUENCE(0));
- for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS; i++) {
+ for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS-1; i++) {
char *oid_str = NULL;
asn1_read_OID(&data,&oid_str);
OIDs[i] = oid_str;
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index cc904c32091..046ea40f59a 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/nsswitch/winbindd.c
@@ -235,7 +235,7 @@ static struct winbindd_dispatch_table {
{ WINBINDD_UID_TO_SID, winbindd_uid_to_sid, "UID_TO_SID" },
{ WINBINDD_GID_TO_SID, winbindd_gid_to_sid, "GID_TO_SID" },
{ WINBINDD_ALLOCATE_UID, winbindd_allocate_uid, "ALLOCATE_UID" },
- { WINBINDD_ALLOCATE_GID, winbindd_allocate_uid, "ALLOCATE_GID" },
+ { WINBINDD_ALLOCATE_GID, winbindd_allocate_gid, "ALLOCATE_GID" },
/* Miscellaneous */
diff --git a/source/passdb/pdb_smbpasswd.c b/source/passdb/pdb_smbpasswd.c
index b976595008a..a8a42196d48 100644
--- a/source/passdb/pdb_smbpasswd.c
+++ b/source/passdb/pdb_smbpasswd.c
@@ -1157,7 +1157,7 @@ static BOOL build_smb_pass (struct smb_passwd *smb_pw, const struct samu *sampas
if (rid == DOMAIN_USER_RID_GUEST) {
struct passwd *passwd = getpwnam_alloc(NULL, lp_guestaccount());
if (!passwd) {
- DEBUG(0, ("Could not find gest account via getpwnam()! (%s)\n", lp_guestaccount()));
+ DEBUG(0, ("Could not find guest account via getpwnam()! (%s)\n", lp_guestaccount()));
return False;
}
smb_pw->smb_userid=passwd->pw_uid;
diff --git a/source/script/installbin.sh.in b/source/script/installbin.sh.in
index 6c578b3971a..59a6c31ca88 100755
--- a/source/script/installbin.sh.in
+++ b/source/script/installbin.sh.in
@@ -4,6 +4,7 @@ INSTALLPERMS=$1
DESTDIR=$2
prefix=`echo $3 | sed 's/\/\//\//g'`
BINDIR=`echo $4 | sed 's/\/\//\//g'`
+SBINDIR=@sbindir@
shift
shift
shift
diff --git a/source/script/uninstallbin.sh.in b/source/script/uninstallbin.sh.in
index d8a48558230..e1bbf6ecb13 100755
--- a/source/script/uninstallbin.sh.in
+++ b/source/script/uninstallbin.sh.in
@@ -5,6 +5,7 @@ INSTALLPERMS=$1
DESTDIR=$2
prefix=`echo $3 | sed 's/\/\//\//g'`
BINDIR=`echo $4 | sed 's/\/\//\//g'`
+SBINDIR=@sbindir@
shift
shift
shift