From db9ea34fd13405ecfa5644a7d27333d0e96ecef7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 22 Sep 2004 12:15:27 +0000 Subject: r2514: Remove unused funcions, and add static. Andrew Bartlett (This used to be commit fd10c9dd536bde497829aaed9e0ba2d51ffe2315) --- source4/lib/util.c | 56 +----------------------------------------------------- 1 file changed, 1 insertion(+), 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