Commit Graph

7 Commits

Author SHA1 Message Date
Corinna Vinschen 8a3adc99ec * mkgroup.c: Add function pointers `netlocalgroupgetmembers' and
`netgroupgetusers'.
        (load_netapi): Load function pointers `netlocalgroupgetmembers'
        and `netgroupgetusers'.
        (enum_local_users): New function.
        (enum_local_groups): Call `enum_local_users' for each group if
        `print_users' is set.
        (enum_users): New function.
        (enum_groups): Call `enum_users' for each group if `print_users' is set.
        (usage): Add usage text for `-u/--users'.
        (longopts): Add option `--users'.
        (opts): Add option character `u'.
        (main): Set `print_users' according to option `-u/--users'.
        Call `enum_local_groups' and `enum_groups' with additional parameter
        `print_users'.
2001-04-16 13:19:27 +00:00
Corinna Vinschen 9f2cad57a6 Patch by Kazuhiro Fujieda <fujieda@jaist.ac.jp>:
* mkgroup.c (enum_groups): Use RID + offset specified an additional
        argument as ID.
        (usage): Add description of -o option.
        (longopts, opts): Add specifications of -o/--id-offset option.
        (main): Add -o option. Invoke enum_groups with specified offset.
        * mkpasswd.c (enum_users): Just like mkgroup.c.
        (usage, longopts, opts): Ditto.
        (main): Add -o option. Invoke enum_users with specified offset
        only against domain accounts.
2001-04-15 14:09:33 +00:00
Egor Duda dd9752e88e * mkgroup.c (uni2ansi): Use native method to convert from Unicode
to multi-byte strings.
* mkpasswd.c (uni2ansi): Ditto.
(enum_users): Pass buffer size when converting string.
(enum_local_groups): Ditto.
* mkgroup.c (enum_groups): Ditto.
(enum_local_groups): Ditto.
2001-04-11 09:38:55 +00:00
Corinna Vinschen 315f8fd37b * mkgroup.c (load_netapi): New function to load netapi32.dll functions
dynamically so that mkgroup works on 9x/ME as well.
        Use corresponding function pointers throughout.
        (usage): Change to `int'. Change text to be conformant to mkpasswd.
        (main): Use `getlongopt' to process options.
        Special handling to create a group entry on 9x/ME.
        * mkpasswd.c (load_netapi): New function to load netapi32.dll functions
        dynamically so that mkpasswd works on 9x/ME as well.
        Use corresponding function pointers throughout.
        (usage): Change to `int'. Change text to be conformant to mkgroup.
        (main): Use `getlongopt' to process options.
        Special handling to create a passwd entry on 9x/ME.
        Change conditional to create an entry for the local administrators
        group when appropriate.
2000-11-08 15:00:02 +00:00
Christopher Faylor e73a56e982 * Makefile.in: Eliminate WINSUP_DEPS.
* cygpath.cc: Reorganize includes to accomodate sys/cygwin.h changes.
* mkgroup.c: Ditto.
* mkpasswd.c: Ditto.
* mount.cc: Ditto.  Eliminate use of cygwin source specific includes.
* ps.cc: Ditto.
* cygwin.cc: Eliminate obsolete file.
2000-05-18 18:39:11 +00:00
Corinna Vinschen 0ac91154fc * mkpasswd.c (main): Use GetDCName instead of GetAnyDCName.
Don't create extra passwd entry for administrators group
        if local_groups is set.
        (usage): Change usage text slightly.
        (enum_users): Loop while ERROR_MORE_DATA is returned.
        (enum_local_groups): Ditto.
        * mkgroup.c (enum_local_groups): Ditto.
        (enum_groups) Ditto.
        (usage): Change usage text slightly.
2000-04-15 22:30:49 +00:00
Christopher Faylor 1fd5e000ac import winsup-2000-02-17 snapshot 2000-02-17 19:38:33 +00:00