summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-09-22 12:15:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:01 -0500
commitdb9ea34fd13405ecfa5644a7d27333d0e96ecef7 (patch)
tree0822a2dbd19f4167a69795cf83215801b7f946ef /source4
parentcde9a48dfb8d4b5d6394f975ddd519c6c581ef39 (diff)
downloadsamba-db9ea34fd13405ecfa5644a7d27333d0e96ecef7.tar.gz
samba-db9ea34fd13405ecfa5644a7d27333d0e96ecef7.tar.bz2
samba-db9ea34fd13405ecfa5644a7d27333d0e96ecef7.zip
r2514: Remove unused funcions, and add static.
Andrew Bartlett (This used to be commit fd10c9dd536bde497829aaed9e0ba2d51ffe2315)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/util.c56
1 files changed, 1 insertions, 55 deletions
diff --git a/source4/lib/util.c b/source4/lib/util.c
index e09796c4f3..c09e1a2997 100644
--- a/source4/lib/util.c
+++ b/source4/lib/util.c
@@ -525,43 +525,6 @@ BOOL process_exists(pid_t pid)
return(kill(pid,0) == 0 || errno != ESRCH);
}
-/*******************************************************************
- Convert a gid into a group name.
-********************************************************************/
-
-char *gidtoname(TALLOC_CTX *mem_ctx, gid_t gid)
-{
- char *name;
- struct group *grp;
-
- grp = getgrgid(gid);
- if (grp)
- return(grp->gr_name);
- name = talloc_asprintf(mem_ctx, "%d",(int)gid);
- return(name);
-}
-
-
-/*******************************************************************
- Convert a name to a gid_t if possible. Return -1 if not a group.
-********************************************************************/
-
-gid_t nametogid(const char *name)
-{
- struct group *grp;
- char *p;
- gid_t g;
-
- g = (gid_t)strtol(name, &p, 0);
- if ((p != name) && (*p == '\0'))
- return g;
-
- grp = sys_getgrnam(name);
- if (grp)
- return(grp->gr_gid);
- return (gid_t)-1;
-}
-
/****************************************************************************
Simple routine to do POSIX file locking. Cruft in NFS and 64->32 bit mapping
is dealt with in posix.c
@@ -653,7 +616,7 @@ void set_remote_arch(struct smbsrv_connection *smb, enum remote_arch_types type)
}
-void print_asc(int level, const uint8_t *buf,int len)
+static void print_asc(int level, const uint8_t *buf,int len)
{
int i;
for (i=0;i<len;i++)
@@ -750,23 +713,6 @@ char *smb_xstrdup(const char *s)
}
-/*
- vasprintf that aborts on malloc fail
-*/
-
- int smb_xvasprintf(char **ptr, const char *format, va_list ap)
-{
- int n;
- va_list ap2;
-
- VA_COPY(ap2, ap);
-
- n = vasprintf(ptr, format, ap2);
- if (n == -1 || ! *ptr)
- smb_panic("smb_xvasprintf: out of memory");
- return n;
-}
-
/*****************************************************************
Like strdup but for memory.
*****************************************************************/