summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-02-16 19:21:18 +0000
committerJeremy Allison <jra@samba.org>2001-02-16 19:21:18 +0000
commitfd46817f0b20c633c80dee70a29cf7478e2dfd68 (patch)
treec7bc095fe35ac78b061d36ae04851ff04b006275 /source3/lib
parent62dc55a43295e9e3abd9da13148b322b3aa89917 (diff)
downloadsamba-fd46817f0b20c633c80dee70a29cf7478e2dfd68.tar.gz
samba-fd46817f0b20c633c80dee70a29cf7478e2dfd68.tar.bz2
samba-fd46817f0b20c633c80dee70a29cf7478e2dfd68.zip
Excise snprintf -> slprintf.
srv_samr.c: duplicate gid fix. srv_spoolss_nt.c: Merge of JF's work. uid.c: Fix for returning names when a PDC. Jeremy. (This used to be commit d938ad6963a2dd4eda930d508600ec1902dc2b16)
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;
}