summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c2
-rw-r--r--source3/lib/util_pw.c44
2 files changed, 1 insertions, 45 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index e143364db5..a23ef91a31 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -118,7 +118,7 @@ BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups)
Like atoi but gets the value up to the separator character.
****************************************************************************/
-char *Atoic(char *p, int *n, char *c)
+static char *Atoic(char *p, int *n, char *c)
{
if (!isdigit((int)*p)) {
DEBUG(5, ("Atoic: malformed number\n"));
diff --git a/source3/lib/util_pw.c b/source3/lib/util_pw.c
index 259649a064..47711788c7 100644
--- a/source3/lib/util_pw.c
+++ b/source3/lib/util_pw.c
@@ -22,50 +22,6 @@
#include "includes.h"
-struct passwd *make_modifyable_passwd(const struct passwd *from)
-{
- struct passwd *ret = smb_xmalloc(sizeof(*ret));
-/* This is the assumed shape of the members by certain parts of the code...
- fstring pw_name;
- fstring pw_passwd;
- fstring pw_gecos;
- pstring pw_dir;
- pstring pw_shell;
-*/
- char *pw_name = smb_xmalloc(sizeof(fstring));
- char *pw_passwd = smb_xmalloc(sizeof(fstring));
- char *pw_gecos = smb_xmalloc(sizeof(fstring));
- char *pw_dir = smb_xmalloc(sizeof(pstring));
- char *pw_shell = smb_xmalloc(sizeof(pstring));
-
- ZERO_STRUCTP(ret);
-
- /*
- * Now point the struct's members as the
- * newly allocated buffers:
- */
-
- ret->pw_name = pw_name;
- fstrcpy(ret->pw_name, from->pw_name);
-
- ret->pw_passwd = pw_passwd;
- fstrcpy(ret->pw_passwd, from->pw_passwd);
-
- ret->pw_uid = from->pw_uid;
- ret->pw_gid = from->pw_gid;
-
- ret->pw_gecos = pw_gecos;
- fstrcpy(ret->pw_gecos, from->pw_gecos);
-
- ret->pw_dir = pw_dir;
- pstrcpy(ret->pw_dir, from->pw_dir);
-
- ret->pw_shell = pw_shell;
- pstrcpy(ret->pw_shell, from->pw_shell);
-
- return ret;
-}
-
static struct passwd *alloc_copy_passwd(const struct passwd *from)
{
struct passwd *ret = smb_xmalloc(sizeof(struct passwd));