1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-07 20:23:50 +03:00

Merge minor library fixes from HEAD to 3.0.

- setenv() replacement
 - mimir's ASN1/SPNEGO typo fixes
 - (size_t)-1 fixes for push_* returns
 - function argument signed/unsigned correction
 - ASN1 error handling (ensure we don't use initiailsed data)
 - extra net ads join error checking
 - allow 'set security discriptor' to fail
 - escape ldap strings in libads.
 - getgrouplist() correctness fixes (include primary gid)

Andrew Bartlett
This commit is contained in:
Andrew Bartlett
-
parent 793609cbc2
commit e9d6e2ea9a
12 changed files with 117 additions and 45 deletions

View File

@@ -447,3 +447,21 @@ char *rep_inet_ntoa(struct in_addr ip)
return t;
}
#endif
#ifndef HAVE_SETENV
int setenv(const char *name, const char *value, int overwrite)
{
char *p = NULL;
int ret = -1;
asprintf(&p, "%s=%s", name, value);
if (overwrite || getenv(name)) {
if (p) ret = putenv(p);
} else {
ret = 0;
}
return ret;
}
#endif