summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/snprintf.c3
-rw-r--r--source3/lib/sysacls.c12
2 files changed, 8 insertions, 7 deletions
diff --git a/source3/lib/snprintf.c b/source3/lib/snprintf.c
index 18ef848c5a..1a8c10afc4 100644
--- a/source3/lib/snprintf.c
+++ b/source3/lib/snprintf.c
@@ -804,6 +804,7 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c)
}
#endif /* !HAVE_VSNPRINTF */
+#if 0 /* DONT USE SNPRINTF !!! */
#ifndef HAVE_SNPRINTF
/* VARARGS3 */
#ifdef HAVE_STDARGS
@@ -827,7 +828,7 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c)
VA_END;
return(strlen(str));
}
-
+#endif
#else
/* keep compilers happy about empty files */
diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c
index cd48214348..640684ffca 100644
--- a/source3/lib/sysacls.c
+++ b/source3/lib/sysacls.c
@@ -194,7 +194,7 @@ int sys_acl_free_acl(SMB_ACL_T the_acl)
/*
* until official facl() support shows up in UW 7.1.2
*/
-int facl(int fd, int cmd, int nentries, struct acl *aclbufp)
+ int facl(int fd, int cmd, int nentries, struct acl *aclbufp)
{
return syscall(188, fd, cmd, nentries, aclbufp);
}
@@ -433,17 +433,17 @@ char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p)
* than just returning an error
*/
default:
- snprintf(tagbuf, sizeof tagbuf, "0x%x",
+ slprintf(tagbuf, sizeof(tagbuf)-1, "0x%x",
ap->a_type);
tag = tagbuf;
- snprintf(idbuf, sizeof idbuf, "%ld",
+ slprintf(idbuf, sizeof(idbuf)-1, "%ld",
(long)ap->a_id);
id = idbuf;
break;
case SMB_ACL_USER:
if ((pw = getpwuid(ap->a_id)) == NULL) {
- snprintf(idbuf, sizeof idbuf, "%ld",
+ slprintf(idbuf, sizeof(idbuf)-1, "%ld",
(long)ap->a_id);
id = idbuf;
} else {
@@ -455,7 +455,7 @@ char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p)
case SMB_ACL_GROUP:
if ((gr = getgrgid(ap->a_id)) == NULL) {
- snprintf(idbuf, sizeof idbuf, "%ld",
+ slprintf(idbuf, sizeof(idbuf)-1, "%ld",
(long)ap->a_id);
id = idbuf;
} else {
@@ -497,7 +497,7 @@ char *sys_acl_to_text(SMB_ACL_T acl_d, ssize_t *len_p)
}
}
- snprintf(&text[len], nbytes, "%s:%s:%s\n", tag, id, perms);
+ slprintf(&text[len], nbytes-1, "%s:%s:%s\n", tag, id, perms);
len += nbytes - 1;
}