diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2011-12-15 22:07:36 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2011-12-15 22:07:36 +0000 |
| commit | d8c29cf81746b7a5551462b1318f8ff9bb76eacf (patch) | |
| tree | 84159dccacb6c27cf0953231da8afd3013dff5a8 /libutil/libutil.h | |
| parent | 354659ccc27c419b3a3043d64ca4820e24d36585 (diff) | |
| download | pw-darwin-d8c29cf81746b7a5551462b1318f8ff9bb76eacf.tar.gz pw-darwin-d8c29cf81746b7a5551462b1318f8ff9bb76eacf.zip | |
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
Diffstat (limited to 'libutil/libutil.h')
| -rw-r--r-- | libutil/libutil.h | 8 |
1 files changed, 7 insertions, 1 deletions
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 |
