From d8c29cf81746b7a5551462b1318f8ff9bb76eacf Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 15 Dec 2011 22:07:36 +0000 Subject: Modify pw_copy: - if pw is NULL and oldpw is not NULL then the oldpw is deleted - if pw->pw_name != oldpw->pw_name but pw->pw_uid == oldpw->pw_uid then it renames the user add new gr_* functions so now gr_util API is similar to pw_util API, this allow to manipulate groups in a safe way. Reviewed by: des Approved by: des MFC after: 1 month --- libutil/libutil.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libutil/libutil.h') diff --git a/libutil/libutil.h b/libutil/libutil.h index fc6d3bb..dea14cf 100644 --- a/libutil/libutil.h +++ b/libutil/libutil.h @@ -152,9 +152,15 @@ int pw_tmp(int _mfd); #endif #ifdef _GRP_H_ +int gr_copy(int __ffd, int _tfd, const struct group *_gr, struct group *_old_gr); +struct group *gr_dup(const struct group *gr); int gr_equal(const struct group *gr1, const struct group *gr2); +void gr_fini(void); +int gr_init(const char *_dir, const char *_master); +int gr_lock(void); char *gr_make(const struct group *gr); -struct group *gr_dup(const struct group *gr); +int gr_mkdb(void); +int gr_tmp(int _mdf); struct group *gr_scan(const char *line); #endif -- cgit v1.2.3