Age | Commit message (Collapse) | Author | Files | Lines |
|
We don't need to use a struct, since the whole message only holds this object. Update the parameters taken in set_self(), which were outdated.
|
|
Clients need to know what values were chosen for fields left blank. This also allows us to return NULL in case of failure, which provides error checking.
|
|
GroupsConfig is now only used to fetch list of groups and settings. All commit operations now go through GroupConfig: set(), add() and del() methods. This avoids problems when committing the whole list, which could lead to removing all groups on the system.
|
|
Instead of getting the password encrypted by the client, get it in plain text, and set it via PAM. This behavior is standard on all supported platforms, which allows for code simplification, and avoids bugs when new password encryption algorithms appear.
Never return the encrypted password on the bus. Instead, PAM should always be used to change it, possibly authenticating when changing own password.
|
|
SelfConfig is now a real object, and a dispatcher redirects messages with the UID of the caller. Rename a few calls that were naming it user_config, to avoid any confusion with the general UserConfig.
Add SelfConfig.pm, only accepting GECOS fields, locale and location, since other parameters can't be changed without admin authentication. Old and new passwords are required, since we'll use PAM to change it. Add Users.pm::[sg]et_self() to handle the DBus methods. Update DBus config file as needed.
|
|
When creating an user, empty string or maximum unsigned 32 bits integer value means "default", platform tools will then apply default system settings themselves. This applies to all parameters but user login, which is mandatory. Most clients should use this instead of guessing the policy by themselves.
On FreeBSD, we need to choose the name of the home dir ourselves, since pw doesn't create it.
|
|
Going through UsersConfig to commit changes to users is not the best solution since this can affect users that were not edited in case of a bug on the client's side. Thus, remove UsersConfig::set() in favor of new UserConfig::add(), del() and set(), which take a generic user structure. Allow these functions in dispatcher.c, but always check for "set" PolicyKit authorization (making distinction between "add", "set", "del" makes no sense at this point).
Add some fields to the user struct to be used later: encrypted home, locale and location, plus password and home directory flags. GID is now an unsigned 32 bits integer, with its max value meaning no group.
Rename D-Bus interfaces to UserConfig2 and UsersConfig2, since we break compatibility. Update DBus config file to reflect that.
|
|
Commit ee59351bfa31ee60779a20a79b1b49f308a777b0 broke it by removing the password parameter.
|
|
Passing a variable that did not exist on default platform completely broke users modification in most cases.
|
|
Versions are confusing, and we should only support the current distribution release, since backports to stable releases are very unlikely. All this complexity was creating bugs with new versions not being supported properly. Adapted from a patch shipped by Debian as 01_debian_4.0.patch.
|
|
arguments
Using system() with a string instead of an array raises various issues when strings passed include special chars. Overall, it's claner and safer to use an array everywhere. This requires us to use our own execution code since system() does not accept setting STDOUT, STDERR, LC_ALL, and starting processes in the background when using an array. Note that run_backticks() still use the old logic, which is safe(r) because those commandlines are static. However, this commit also cleans get_cmd_path() by merging do_get_cmd_path() into it, and removing duplicate settings like $PATH.
|
|
Used by Gentoo for a long time.
|
|
UsersConfig.
* StbObject.pm: Add DBus method there.
* Users/Users.pm: turns out that get_files was already there, move it after the other main methods.
* UserConfig.pm, UsersConfig.pm: implement getFiles().
|
|
This is a interface change, but a few more are to come in order to become more maintenable in the future, and the adoption of s-t-b is still low enough.
|
|
This way, if a user changes login name, for s-t-b it will count as a removal and an addition. I don't think that renaming an user is an usual task, and the ID relies too much on the other side having the correct ID accounting, under risk of screwing up if it differs at some point (besides, the meaning of the configuration in the other side should not depend on this side)
|
|
It will get/set configuration for a single user, this should be hidden by the dispatcher in the form of SelfConfig, as the backend modules can't know the uid of the requester.
|
|
|
|
Add support for Archlinux to UsersConfig and ServicesConfig. patch
provided by Ermanno Scaglione <e.scaglione@arcor.de>
* Users/Users.pm (add_user): Archlinux prefers useradd.
* Init/Services.pm (get_runlevels) (set_archlinux_service_status)
(get_rcng_service_info) (run_rcng_script): Fixes for rcng/archlinux
init.
|
|
* Users/Users.pm (add_user): adduser doesn't work as expected in
Slackware, make sure we fallback to useradd for that distro. Spotted
by Markus Kanet <<darkvision@gmx.info>
|
|
* Users/Users.pm (add_user): use abbreviated options for useradd, they
seem to be more generic, and makes adding users work again for
Slackware. Based on a patch by Markus Kanet <darkvision@gmx.info>. Bug
#471083.
|
|
* Users/Shells.pm (get): get list of unique elements.
|
|
Ported to 1.9.x a huge and incredible patch by Darren Kenny
<Darren.Kenny@Sun.COM> and Erast Benson <erast@gnusolaris.com>
to make s-t-b recognize and configure SunOS based systems.
* Utils/Platform.pm: recognize OpenSolaris and Nexenta properly.
* Utils/File.pm (read_joined_lines): added.
* Users/Shells.pm, Users.pm, Groups.pm: add SunOS case paths.
* Time/NTP.pm, TimeDate.pm: ditto.
* Shares/NFS.pm: parse/modify dfstab in the SunOS case
* Network/Hosts.pm, Ifaces.pm: add code to deal with SunOS network
configuration.
* Init/Services.pm: deal with SMF init system.
|
|
* UsersConfig.pm, GroupsConfig.pm, Users/Users.pm, Users/Groups.pm:
add an independent identification number to users and groups, this
number should not be modified in the other communication side (GID
and UID can be changed) and new users/groups should have different ID
numbers (ideally counting from the current max ID number). Fixes the
case described in GNOME bug #342293.
|
|
* Utils/Platform.pm (guess): make distribution detection more generic,
remove lots of check_distro() functions.
(ensure_distro_map): create a distro metamap, from now adding a new
distro that behaves exactly like another will be one liner.
(PLATFORM_INFO): remove some ancient (as in ooold) distros.
* Init/Services.pm, Network/Hosts.pm, Network/Ifaces.pm,
Shares/SMB.pm, Time/NTP.pm, Time/TimeDate.pm, Users/Users.pm: Unify
parse/replace distro maps where necessary, make shorter those lists
now that the distro metamap is there.
|
|
* Makefile.am, Init/Makefile.am, Network/Makefile.am,
Shares/Makefile.am, Time/Makefile.am, Users/Makefile.am,
Utils/Makefile.am: distcheck fixes
|
|
* Users/Users.pm (change_user_chfn): specify which user to modify.
(add_user): remove a stray apostrophe.
* Users/Groups.pm (change_group): get the correct state for the users
|
|
* Network/Ifaces.pm: fix wireless support, improve interface type
detection.
* Init/Services.pm, Init/ServicesList.pm, Network/Hosts.pm,
Network/Ifaces.pm, Shares/SMB.pm, Time/NTP.pm, Time/TimeDate.pm,
Users/Users.pm, Utils/Platform.pm: add support for FreeBSD 7
|
|
* UsersConfig.pm: added default group. -1 will mean "create new group
for the user"
* Users/Groups.pm: use addgroup/delgroup if available
* Users/Users.pm: use adduser/deluser if available, translate default
group to GIDs. Do not use a global variable getting the configuration,
some values may survive several get() calls
|
|
* Merged the waiting-the-dbus branch into HEAD
* configure.in, Makefile.am, autogen.sh: bump to 1.9.0, do not use
translations (no longer needed) and fix references to the new .pc file
* GroupsConfig.pm, HostsConfig.pm, IfacesConfig.pm, NFSConfig.pm,
NTPConfig.pm, SMBConfig.pm, ServicesConfig.pm, ServicesList.pm,
SharesList.pm, SystemToolsBackends.pl.in, TimeConfig.pm,
UsersConfig.pm, org.freedesktop.SystemToolsBackends.service.in,
system-tools-backends-2.0.pc.in, test-backends, Init/Services.pm,
Init/ServicesList.pm, Network/Hosts.pm, Network/Ifaces.pm,
Shares/Exports.pm, Shares/NFS.pm, Shares/SMB.pm, Time/NTP.pm,
Time/TimeDate.pm, Users/Groups.pm, Users/Shells.pm, Users/Users.pm,
Utils/Backend.pm, Utils/File.pm, Utils/Monitor.pm, Utils/Parse.pm,
Utils/Platform.pm, Utils/Replace.pm, Utils/Report.pm, Utils/Util.pm,
Utils/XML.pm: Added/refactored files, replace the functionality in
the older *.pl.in files
* boot-conf.in, boot-grub.pl.in, boot-lilo.pl.in, boot-yaboot.pl.in,
boot.pl.in, file.pl.in, general.pl.in, network-conf.in, network.pl.in,
parse.pl.in, platform.pl.in, replace.pl.in, report.pl.in,
service-list.pl.in, service.pl.in, services-conf.in, share.pl.in,
shares-conf.in, system-tools-backends.pc.in, time-conf.in,
users-conf.in, util.pl.in, xml.pl.in: Functional removed files,
they've been replaced with the files above.
* add_amp.sh, debug.pl.in, dhcpd-conf.in, dhcpd.pl.in, disks-conf.in,
display-conf.in, filesys.pl.in, font-conf.in, font.pl.in,
gen-reportcode-list.sh, guess_system.sh, hardware-conf.in,
internetsharing-conf.in, ishare.pl.in, media.pl.in, memory-conf.in,
mouse-conf.in, option.pl, package-conf.in, partition.pl.in,
perldoc.pl, print-conf.in, print.pl.in, process.pl.in,
removable-media.pl.in, rhprinterdb2gstxml.pl, test.pl,
tokenizer.pl.in, type1inst, x.pl.in: Bunch of unused files (or used in
unstable tools), if/when they prove their usefulness, they'll be added
back, but for now they'd better be in the Attic.
|