summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in2
-rw-r--r--source3/auth/token_util.c1
-rw-r--r--source3/include/proto.h7
-rw-r--r--source3/lib/system.c44
-rw-r--r--source3/lib/username.c1
-rw-r--r--source3/lib/util.c1
-rw-r--r--source3/passdb/pdb_interface.c1
-rw-r--r--source3/passdb/util_unixsids.c1
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c1
-rw-r--r--source3/smbd/ntquotas.c1
-rw-r--r--source3/torture/cmd_vfs.c1
-rwxr-xr-xsource3/wscript_build2
12 files changed, 10 insertions, 53 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index b2f4594f2c..109d0801ac 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -424,7 +424,7 @@ UTIL_OBJ = ../lib/util/rbtree.o ../lib/util/signal.o ../lib/util/time.o \
../lib/util/tevent_werror.o \
../lib/util/smb_threads.o ../lib/util/util_id.o \
../lib/util/blocking.o ../lib/util/rfc1738.o \
- ../lib/util/select.o
+ ../lib/util/select.o ../lib/util/util_pw.o
CRYPTO_OBJ = ../lib/crypto/crc32.o ../lib/crypto/md5.o \
../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o \
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index 4942740ed0..f88511d8d6 100644
--- a/source3/auth/token_util.c
+++ b/source3/auth/token_util.c
@@ -29,6 +29,7 @@
#include "memcache.h"
#include "../librpc/gen_ndr/netlogon.h"
#include "../libcli/security/security.h"
+#include "../lib/util/util_pw.h"
/****************************************************************************
Check for a SID in an struct security_token
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 14ec2d6853..94cc9f9baa 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -868,13 +868,6 @@ void sys_srandom(unsigned int seed);
int groups_max(void);
int sys_getgroups(int setlen, gid_t *gidset);
int sys_setgroups(gid_t UNUSED(primary_gid), int setlen, gid_t *gidset);
-void sys_setpwent(void);
-struct passwd *sys_getpwent(void);
-void sys_endpwent(void);
-struct passwd *sys_getpwnam(const char *name);
-struct passwd *sys_getpwuid(uid_t uid);
-struct group *sys_getgrnam(const char *name);
-struct group *sys_getgrgid(gid_t gid);
int sys_popen(const char *command);
int sys_pclose(int fd);
ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t size);
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 092287a602..d1a1403340 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1346,50 +1346,6 @@ int sys_setgroups(gid_t UNUSED(primary_gid), int setlen, gid_t *gidset)
}
/**************************************************************************
- Wrappers for setpwent(), getpwent() and endpwent()
-****************************************************************************/
-
-void sys_setpwent(void)
-{
- setpwent();
-}
-
-struct passwd *sys_getpwent(void)
-{
- return getpwent();
-}
-
-void sys_endpwent(void)
-{
- endpwent();
-}
-
-/**************************************************************************
- Wrappers for getpwnam(), getpwuid(), getgrnam(), getgrgid()
-****************************************************************************/
-
-
-struct passwd *sys_getpwnam(const char *name)
-{
- return getpwnam(name);
-}
-
-struct passwd *sys_getpwuid(uid_t uid)
-{
- return getpwuid(uid);
-}
-
-struct group *sys_getgrnam(const char *name)
-{
- return getgrnam(name);
-}
-
-struct group *sys_getgrgid(gid_t gid)
-{
- return getgrgid(gid);
-}
-
-/**************************************************************************
Extract a command into an arg list.
****************************************************************************/
diff --git a/source3/lib/username.c b/source3/lib/username.c
index 4e77bee304..eea906128e 100644
--- a/source3/lib/username.c
+++ b/source3/lib/username.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "memcache.h"
+#include "../lib/util/util_pw.h"
/* internal functions */
static struct passwd *uname_string_combinations(char *s, TALLOC_CTX *mem_ctx,
diff --git a/source3/lib/util.c b/source3/lib/util.c
index b99d9d42a8..2690a6f649 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -25,6 +25,7 @@
#include "popt_common.h"
#include "secrets.h"
#include "ctdbd_conn.h"
+#include "../lib/util/util_pw.h"
/* Max allowable allococation - 256mb - 0x10000000 */
#define MAX_ALLOC_SIZE (1024*1024*256)
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 8cdaaaa569..046ca650cf 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -26,6 +26,7 @@
#include "memcache.h"
#include "nsswitch/winbind_client.h"
#include "../libcli/security/security.h"
+#include "../lib/util/util_pw.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
diff --git a/source3/passdb/util_unixsids.c b/source3/passdb/util_unixsids.c
index 00cab22deb..cf85a5dbf1 100644
--- a/source3/passdb/util_unixsids.c
+++ b/source3/passdb/util_unixsids.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "../libcli/security/security.h"
+#include "../lib/util/util_pw.h"
bool sid_check_is_unix_users(const struct dom_sid *sid)
{
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index f0a105e33e..a0ed295ed3 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -30,6 +30,7 @@
#include "../librpc/gen_ndr/ndr_security.h"
#include "dbwrap.h"
#include "session.h"
+#include "../lib/util/util_pw.h"
extern const struct generic_mapping file_generic_mapping;
diff --git a/source3/smbd/ntquotas.c b/source3/smbd/ntquotas.c
index 95e9ec3b24..141f1f81b2 100644
--- a/source3/smbd/ntquotas.c
+++ b/source3/smbd/ntquotas.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "../lib/util/util_pw.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_QUOTA
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index ea5004ce63..3d7420cba9 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "vfstest.h"
+#include "../lib/util/util_pw.h"
static const char *null_string = "";
diff --git a/source3/wscript_build b/source3/wscript_build
index 3e71e94c43..76abe0b9bb 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -773,7 +773,7 @@ bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
bld.SAMBA3_LIBRARY('samba3core',
source=LIB_SRC,
- deps='LIBCRYPTO ndr ndr-util security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 samba-util3 CHARSET3 UTIL_TDB SAMBA_VERSION krb5 flag_mapping util_reg',
+ deps='LIBCRYPTO ndr ndr-util security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 samba-util3 CHARSET3 UTIL_TDB UTIL_PW SAMBA_VERSION krb5 flag_mapping util_reg',
private_library=True,
vars=locals())