summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-06-24 20:25:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:00 -0500
commit19ca97a70f6b7b41d251eaa76e4d3c980c6eedff (patch)
tree18d7d81e2c1aa7cf9325899b7e8fc90b41c14c8b /source3/lib
parent8387af752f81e26f1c141f6053bf6d106f0af5eb (diff)
downloadsamba-19ca97a70f6b7b41d251eaa76e4d3c980c6eedff.tar.gz
samba-19ca97a70f6b7b41d251eaa76e4d3c980c6eedff.tar.bz2
samba-19ca97a70f6b7b41d251eaa76e4d3c980c6eedff.zip
r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy (This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/data_blob.c1
-rw-r--r--source3/lib/secace.c26
-rw-r--r--source3/lib/util.c6
3 files changed, 17 insertions, 16 deletions
diff --git a/source3/lib/data_blob.c b/source3/lib/data_blob.c
index 35805f861c..161f46a941 100644
--- a/source3/lib/data_blob.c
+++ b/source3/lib/data_blob.c
@@ -35,6 +35,7 @@ static void free_data_blob(DATA_BLOB *d)
construct a data blob, must be freed with data_blob_free()
you can pass NULL for p and get a blank data blob
*******************************************************************/
+
DATA_BLOB data_blob(const void *p, size_t length)
{
DATA_BLOB ret;
diff --git a/source3/lib/secace.c b/source3/lib/secace.c
index c550dcce31..b2cf81d0fd 100644
--- a/source3/lib/secace.c
+++ b/source3/lib/secace.c
@@ -72,25 +72,25 @@ void init_sec_ace(SEC_ACE *t, const DOM_SID *sid, uint8 type, SEC_ACCESS mask, u
adds new SID with its permissions to ACE list
********************************************************************/
-NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, unsigned *num, DOM_SID *sid, uint32 mask)
+NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, unsigned *num, DOM_SID *sid, uint32 mask)
{
unsigned int i = 0;
- if (!ctx || !new || !old || !sid || !num) return NT_STATUS_INVALID_PARAMETER;
+ if (!ctx || !pp_new || !old || !sid || !num) return NT_STATUS_INVALID_PARAMETER;
*num += 1;
- if((new[0] = TALLOC_ZERO_ARRAY(ctx, SEC_ACE, *num )) == 0)
+ if((pp_new[0] = TALLOC_ZERO_ARRAY(ctx, SEC_ACE, *num )) == 0)
return NT_STATUS_NO_MEMORY;
for (i = 0; i < *num - 1; i ++)
- sec_ace_copy(&(*new)[i], &old[i]);
+ sec_ace_copy(&(*pp_new)[i], &old[i]);
- (*new)[i].type = 0;
- (*new)[i].flags = 0;
- (*new)[i].size = SEC_ACE_HEADER_SIZE + sid_size(sid);
- (*new)[i].info.mask = mask;
- sid_copy(&(*new)[i].trustee, sid);
+ (*pp_new)[i].type = 0;
+ (*pp_new)[i].flags = 0;
+ (*pp_new)[i].size = SEC_ACE_HEADER_SIZE + sid_size(sid);
+ (*pp_new)[i].info.mask = mask;
+ sid_copy(&(*pp_new)[i].trustee, sid);
return NT_STATUS_OK;
}
@@ -117,19 +117,19 @@ NTSTATUS sec_ace_mod_sid(SEC_ACE *ace, size_t num, DOM_SID *sid, uint32 mask)
delete SID from ACL
********************************************************************/
-NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, uint32 *num, DOM_SID *sid)
+NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, uint32 *num, DOM_SID *sid)
{
unsigned int i = 0;
unsigned int n_del = 0;
- if (!ctx || !new || !old || !sid || !num) return NT_STATUS_INVALID_PARAMETER;
+ if (!ctx || !pp_new || !old || !sid || !num) return NT_STATUS_INVALID_PARAMETER;
- if((new[0] = TALLOC_ZERO_ARRAY(ctx, SEC_ACE, *num )) == 0)
+ if((pp_new[0] = TALLOC_ZERO_ARRAY(ctx, SEC_ACE, *num )) == 0)
return NT_STATUS_NO_MEMORY;
for (i = 0; i < *num; i ++) {
if (sid_compare(&old[i].trustee, sid) != 0)
- sec_ace_copy(&(*new)[i], &old[i]);
+ sec_ace_copy(&(*pp_new)[i], &old[i]);
else
n_del ++;
}
diff --git a/source3/lib/util.c b/source3/lib/util.c
index b7651f8929..42cbc7288f 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2217,14 +2217,14 @@ int set_maxfiles(int requested_max)
Possibly replace mkstemp if it is broken.
*****************************************************************/
-int smb_mkstemp(char *template)
+int smb_mkstemp(char *name_template)
{
#if HAVE_SECURE_MKSTEMP
- return mkstemp(template);
+ return mkstemp(name_template);
#else
/* have a reasonable go at emulating it. Hope that
the system mktemp() isn't completly hopeless */
- char *p = mktemp(template);
+ char *p = mktemp(name_template);
if (!p)
return -1;
return open(p, O_CREAT|O_EXCL|O_RDWR, 0600);