Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37760553
en ru br
ALT Linux repos
S:0.3.4-alt1
5.0: 0.2.10-alt2
4.1: 0.2.9-alt1
4.0: 0.2.9-alt1
3.0: 0.2.8.1-alt1

Group :: System/Configuration/Other
RPM: userpasswd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

userpasswd-0.2.10/000075500000000000000000000000001213362101700137645ustar00rootroot00000000000000userpasswd-0.2.10/COPYING000064400000000000000000000613141213362101700150240ustar00rootroot00000000000000		  GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]

Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.

This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.

When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.

For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.

Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.

Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.

Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.

Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.

The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.

Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.

However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.

The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.

Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.

GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".

A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.

The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)

"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.

1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.

You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.

2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

a) The modified work must itself be a software library.

b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.

c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.

d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.

(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)

These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.

In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.

Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.

This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.

4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.

If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.

5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.

However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.

When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.

If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)

Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.

6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.

You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:

a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)

b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.

c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.

d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.

For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.

It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.

7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:

a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.

b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.

8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.

9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.

10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.

13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.

14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

NO WARRANTY

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Libraries

If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).

To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307 USA.

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.

<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice

That's all there is to it!
userpasswd-0.2.10/Makefile000064400000000000000000000021011213362101700154160ustar00rootroot00000000000000#
# Copyright (C) 2002 Stanislav Ievlev <inger@altlinux.org>
# Copyright (C) 2002, 2005 Dmitry V. Levin <ldv@altlinux.org>
#
# root Makefile for project
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

ifeq ($(strip $(SUBDIRS)),)
SUBDIRS = $(shell find -mindepth 1 -maxdepth 1 -name '[a-z]*' -type d |LC_COLLATE=C sort)
endif

.PHONY: all install clean

all install clean:
@for s in $(SUBDIRS); do $(MAKE) -C $$s $@ || exit; done
userpasswd-0.2.10/README000064400000000000000000000000601213362101700146400ustar00rootroot00000000000000Simple GUI wrapper using system passwd utility.
userpasswd-0.2.10/menu/000075500000000000000000000000001213362101700147305ustar00rootroot00000000000000userpasswd-0.2.10/menu/Makefile000064400000000000000000000020241213362101700163660ustar00rootroot00000000000000#
# Copyright (C) 2002 Stanislav Ievlev <inger@altlinux.org>
# Copyright (C) 2002, 2005 Dmitry V. Levin <ldv@altlinux.org>
#
# Makefile for menus
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

INSTALL = install

menudir = /usr/share/applications

.PHONY: all install clean

all clean:

install:
$(INSTALL) -pD -m644 userpasswd.desktop $(RPM_BUILD_ROOT)$(menudir)/userpasswd.desktop
userpasswd-0.2.10/menu/userpasswd.desktop000064400000000000000000000005141213362101700205230ustar00rootroot00000000000000[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=UserPasswd
GenericName=Change Password
Comment=Change your password
Name[ru]=UserPasswd
GenericName[ru]=Смена пароля
Comment[ru]=Изменение личного пароля
Icon=userpasswd-keyring
Exec=/usr/share/userpasswd/loop
Terminal=false
Categories=Settings;
userpasswd-0.2.10/pixmaps/000075500000000000000000000000001213362101700154455ustar00rootroot00000000000000userpasswd-0.2.10/pixmaps/Makefile000064400000000000000000000020521213362101700171040ustar00rootroot00000000000000#
# Copyright (C) 2002 Stanislav Ievlev <inger@altlinux.org>
# Copyright (C) 2002, 2005 Dmitry V. Levin <ldv@altlinux.org>
#
# Makefile for pixmaps
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

INSTALL = install

datadir = /usr/share

.PHONY: all install clean

all clean:

install:
for f in *.png; do \
$(INSTALL) -pD -m644 "$$f" \
"$(RPM_BUILD_ROOT)$(datadir)/pixmaps/userpasswd-$$f"; \
done
userpasswd-0.2.10/pixmaps/critical.png000064400000000000000000000030671213362101700177530ustar00rootroot00000000000000PNG

IHDR szzgAMA7tEXtSoftwareAdobe ImageReadyqe<IDATxb?@bD)>tc`4?Aۍa1<@`NA,*x
X _7CH/|@j>ȷb~yy[[& b؇ fx} ;1H" N30|b0Hf#?˗3ܛ5ާO P@-O`54xkj-,HJ\?~dPVpf^OG,`R|@BΎTmR O! 8_򹲕OS$>>}"V4w`h@p@S}& ,* 1AQؘ ŇANYiLas (Mb<( &xp@(10*}AL b9 60c 9 2sr2@ˏxPVSRb`}ـL(@E=`yd !^@y||8!S@,TlW%,`@[BWC1tX.}ϭ[ _d]!m@@}*^xeF»wCf !29$ck2e}:_vc nĉQq,`UN@A|lgho;Lr0,Ï!!GPâ `! ߿6`@J`kLS5!L"
P__A P7!"@%xp; .:+ 1^`0:`:m|f"Aj\!
;8Lj!c@Ľnb5J} a62I=@` x]jÁ=&wrsQw
|H/ s@?@|!L @,LLʈaښ5 EESa0CBu|fE 7(AcBilTJ쀍NV&& h:N +>dx ;ː$$[m 1vV |?!sX‚hM2(] mXrsre'`U_,_PQ
@8ˠ! ]UUMPp;v6w`c&@!ŠLr22 ‚Xտ#w<a
߾KXpb @-!uX!#!UdЊ52'A Y @ vNI@w }WF,3IENDB`userpasswd-0.2.10/pixmaps/info.png000064400000000000000000000005071213362101700171100ustar00rootroot00000000000000PNG

IHDR szzIDATxA EƳ1c҅:E ]ϸ2_$)@DZ麮(qiV۶DGm*sS8|Dkڵ,t5%9w!rYpMR4ϊFFryk-*ɀ u<'/DtO5W97ٙlZ|WѼ֌bPgBBT6ܢwBYVO!ǤNa}KL-G!#l8灠̲OXIENDB`userpasswd-0.2.10/pixmaps/keyring.png000064400000000000000000000060721213362101700176300ustar00rootroot00000000000000PNG

IHDR00WbKGD pHYs  ~tIME!Wq IDATx{pWv?zْ/dcuby9 1N4Y.nYf N3eMf!Ӵ Mg15mjlmb,l+d=~H摲 dMHfzf'~=s妺q變zRTTdZxikEEEZPȲL4Ee.^HKK --->so*{p\"1'ZZZnbttT{OTVV
c A+Pb
Cؾ};e !tc4_ + X`LJJ=zTE4Q!(--`0Yn_ż~9LD:iۀ~P+p &''ȑ#@ `l`,$P\\PFzzw La?0fff3>>nرcYY;Ru[uym
gU rT ߃t|c&]F,KRXce``6H_FZٰNBA4@T *5`}u" E ԩSgaڲ\jIk0 B!RQ^`F^pp)UV199I4exxxpߤ?UnߏJXz5phM`kL`J 9L6aQ/
aBH~cݷoetH}BRM$??p8L8Y3zOl1%"궦OKtKs-=iU"B>JE8FPQ.hA^=*@SQ^R_GG:Yٴi}^z MZVrAbGs"X ޞ
(ձP!JrSغn;eeedgg7{nmjjj$)) CR"A&qͅ6IG*{
h *XElODet:/YYYd2by r
H+B$,CS ÌH@:بтK
|m6,PPP޽{)//iBB3Lj, ~=X 3AFF,L:ύA(ɕ0'45NSghq\wrL&B+%%%TUUfmzzzNbb"J7_@!DDXtIhn􏾁&|d6ri]nt`ܹSt!(((Hrr2999t:l6gWC-8@$V}=
>;{y~j|?D\"󙑻\Ֆ=77$Iڔ~233d2a4i2΍E7g_rlⱟF(;<[>jOFGcccD"LMM!26l@Pz}|x+FʓPtB!GPF#(dRV.#8~%Q::0MmZ'4UZ/mmX4)--41La o笋5<XH-Ly~Jxv@,^Y%3C.l=K p'{ddd1zM l4^./\HcA*oQdy!Aqw 쯘3+خ^\4rssEANNw+~!U#IONΕ@e%px"HJ^ ̲j'MuDl]]]Ϲn% 233#
a6fŊȲ0|zgsh B'%/IwuvW_u!T_~#[d``dbb˗/G?V"55p8LVV)}&fL8imakn9BC|vSǯrwߣ/G}>pLvv/h4Q*HD0$S/D"˿+i P8d uv?>JSK!KЎt:B,vTtR]]lj^ei  hS<~篱}kK?T.w2W ^B"Fm˱ZڅGLWI^Lf<= S<Sb+Xj3g<1%ڵ RVezz#<z{{8&pXGTZ߇TIxڏ˶`4~ ۂ5~sAA)))GQYYIQQǏBu%Y<.my7!*_c4/f X,˗nRIEE,kϞ=Ns#vFVP[(s˶"=>QKpMCrn7^zrssx"?<ANyTsvsp\jZelV\ɓ'"??F>7><ǖ4ק\h"E_?X;AmFzz:Nh4Jaa!a eX*L%΢LT37:BtlG\Dkkpطork7?~q>ufBZyff$$Ibhhb
t9>w;ssV۟={K._|Q vzu+LiLzz:Ԑ=}tν?P> %Fzzzx)--cMMM-[0L<y{ Jӧq
8ҥK\vRINNgϞ%
әR
Q8Nޭڪ9[RR"***AB[ [f jyIENDB`userpasswd-0.2.10/po/000075500000000000000000000000001213362101700144025ustar00rootroot00000000000000userpasswd-0.2.10/po/.gitignore000064400000000000000000000000051213362101700163650ustar00rootroot00000000000000*.mo
userpasswd-0.2.10/po/Makefile000064400000000000000000000033421213362101700160440ustar00rootroot00000000000000#
# Copyright (C) 2002 Stanislav Ievlev <inger@altlinux.org>
# Copyright (C) 2002, 2005 Dmitry V. Levin <ldv@altlinux.org>
#
# Makefile for pofiles
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

INSTALL = /usr/bin/install
XGETTEXT=/usr/bin/xgettext
MSGFMT=/usr/bin/msgfmt
MSGMERGE=/usr/bin/msgmerge

PACKAGE = userpasswd
POTFILE = $(PACKAGE).po
CATALOGS = ru
MOFILES = $(CATALOGS:=.mo)
SOURCES = $(wildcard ../src/*.c)

localedir = /usr/share/locale

.PHONY: all install clean update

all: $(MOFILES)

install:
@for n in $(CATALOGS); do \
$(INSTALL) -vpD -m644 $$n.mo \
$(RPM_BUILD_ROOT)$(localedir)/$$n/LC_MESSAGES/$(PACKAGE).mo; \
done

clean:
$(RM) $(MOFILES) $(POTFILE) *.old *.new

update: $(POTFILE)
@for lang in $(CATALOGS); do \
mv $$lang.po $$lang.old.po; \
echo -n "$$lang "; \
if $(MSGMERGE) $$lang.old.po $(POTFILE) -o $$lang.po; then \
$(RM) $$lang.old.po; \
else \
echo "failed!"; \
$(RM) $$lang.po; \
mv $$lang.old.po $$lang.po; \
fi; \
done

$(POTFILE): $(SOURCES)
$(XGETTEXT) --keyword=_ -d $(PACKAGE) $^

%.mo: %.po
$(MSGFMT) $(OUTPUT_OPTION) $<
userpasswd-0.2.10/po/ru.po000064400000000000000000000041541213362101700153740ustar00rootroot00000000000000# Passwd wrapper.
# Copyright (C) 2002 Stanislav Ievlev <inger@altlinux.org>
# Copyright (C) 2002 Dmitry V. Levin <ldv@altlinux.org>
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2002-03-17 15:26+0300\n"
"PO-Revision-Date: 2002-03-17 15:26+0300\n"
"Last-Translator: Dmitry V. Levin <ldv@altlinux.org>\n"
"Language-Team: <devel@altlinux.ru>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=koi8-r\n"
"Content-Transfer-Encoding: 8bit\n"

#: ../src/conv.c:109 ../src/conv.c:113 ../src/conv.c:118 ../src/conv.c:132
#: ../src/ui.c:280
msgid "Error"
msgstr ""

#: ../src/conv.c:110
msgid "System configuration error."
msgstr " ."

#: ../src/conv.c:115
msgid ""
"Wrong password.\n"
"Please try again."
msgstr ""
" .\n"
" ."

#: ../src/conv.c:120
msgid ""
"Weak password.\n"
"Please try again."
msgstr ""
" .\n"
" ."

#: ../src/conv.c:125
msgid "Results"
msgstr ""

#: ../src/conv.c:127
msgid "Password sucessully changed."
msgstr " ."

#: ../src/conv.c:133
msgid "Password conversation error."
msgstr ""

#: ../src/ui.c:98 ../src/ui.c:182
msgid "Ok"
msgstr ""

#: ../src/ui.c:192
msgid "Cancel"
msgstr ""

#: ../src/ui.c:246
msgid "Current password"
msgstr " "

#: ../src/ui.c:248
msgid ""
"Please enter your\n"
"current password first"
msgstr ""
", \n"
" "

#: ../src/ui.c:249
msgid "Enter current password:"
msgstr " :"

#: ../src/ui.c:266
msgid "New password"
msgstr " "

#: ../src/ui.c:267 ../src/ui.c:273
msgid ""
"Now enter your\n"
"new password twice"
msgstr ""
" \n"
" "

#: ../src/ui.c:268
msgid "Enter new password:"
msgstr " :"

#: ../src/ui.c:272
msgid "Re-type password"
msgstr " "

#: ../src/ui.c:274
msgid "Re-type new password:"
msgstr " :"

#: ../src/ui.c:282
msgid ""
"Sorry, passwords do not match.\n"
"Please try again."
msgstr ""
" \n"
" ."
userpasswd-0.2.10/src/000075500000000000000000000000001213362101700145535ustar00rootroot00000000000000userpasswd-0.2.10/src/.gitignore000064400000000000000000000000221213362101700165350ustar00rootroot00000000000000userpasswd
*.[do]
userpasswd-0.2.10/src/Makefile000064400000000000000000000032701213362101700162150ustar00rootroot00000000000000#
# Copyright (C) 2002 Stanislav Ievlev <inger@altlinux.org>
# Copyright (C) 2002, 2005, 2006 Dmitry V. Levin <ldv@altlinux.org>
#
# Makefile for sources
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

CPPFLAGS = $(RPM_OPT_FLAGS) -D_GNU_SOURCE $(shell pkg-config gtk+-2.0 --cflags)
LDLIBS = $(shell pkg-config gtk+-2.0 --libs)
INSTALL = install
PACKAGE = userpasswd

SRC = child.c conv.c main.c parent.c ui.c
OBJ = $(SRC:.c=.o)
DEP = $(SRC:.c=.d)

bindir = /usr/bin
datadir = /usr/share

.PHONY: all install clean

all: $(PACKAGE)

$(PACKAGE): $(OBJ)
$(LINK.o) $^ $(LDLIBS) -o $@

install: all
$(INSTALL) -pD -m755 $(PACKAGE) $(RPM_BUILD_ROOT)$(bindir)/$(PACKAGE)
$(INSTALL) -pD -m755 loop.sh $(RPM_BUILD_ROOT)$(datadir)/$(PACKAGE)/loop

clean:
$(RM) $(DEP) $(OBJ) $(PACKAGE) *~

# We need dependencies only if goal isn't "clean"
ifneq ($(MAKECMDGOALS),clean)

%.d: %.c
@echo Making dependences for $<
@$(SHELL) -ec "$(CC) -MM $(CPPFLAGS) $< | sed 's|\($*\)\.o[ :]*|\1.o $@ : |g' > $@; [ -s $@ ] || $(RM) $@"

ifneq ($(DEP),)
-include $(DEP)
endif

endif
userpasswd-0.2.10/src/child.c000064400000000000000000000051701213362101700160050ustar00rootroot00000000000000
/*
Copyright (C) 2002 Stanislav Ievlev <inger@altlinux.org>
Copyright (C) 2002 Dmitry V. Levin <ldv@altlinux.org>

child handler

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <error.h>

#ifdef __linux__
#include <linux/limits.h>
#endif

/*
* setup file descriptors
*/
static void
setup_fds (const int *fd)
{
int i;

for (i = 0; i < 3; ++i)
if ((fd[i] != i) && (dup2 (fd[i], i) != i))
error (EXIT_FAILURE, errno, "dup2");
}

/*
* close unneeded file descriptors
*/
static void
closeall_fds (int start)
{
int fd, max;

max = sysconf (_SC_OPEN_MAX);
if (max <= 0)
max = 1024;

#ifdef __linux__
if (max < NR_OPEN)
max = NR_OPEN;
#endif

for (fd = start; fd < max; ++fd)
close (fd);
}

/*
* cleanup environment
*/
static void
sanitize_env (void)
{
const char *restricted_envvars[] = {
"LANG",
"LANGUAGE",
"LINGUAS",
"LC_CTYPE",
"LC_NUMERIC",
"LC_TIME",
"LC_COLLATE",
"LC_MONETARY",
"LC_MESSAGES",
"LC_PAPER",
"LC_NAME",
"LC_ADDRESS",
"LC_TELEPHONE",
"LC_MEASUREMENT",
"LC_IDENTIFICATION",
"LC_ALL",
"LC_XXX"
};
size_t cnt;

for (cnt = 0;
cnt <
sizeof (restricted_envvars) / sizeof (restricted_envvars[0]);
++cnt)
unsetenv (restricted_envvars[cnt]);
}

/*
* child process
*/
void
do_child (const char *name)
{
int slave_r, slave_w;

if (setsid () < 0)
error (EXIT_FAILURE, errno, "setsid");

slave_r = open (name, O_RDONLY);
if (slave_r < 0)
error (EXIT_FAILURE, errno, "open ro %s", name);

slave_w = open (name, O_WRONLY);
if (slave_w < 0)
error (EXIT_FAILURE, errno, "open rw %s", name);

{
int fd[3] = { slave_r, slave_w, slave_w };

setup_fds (fd);
}

closeall_fds (1 + STDERR_FILENO);

sanitize_env ();

{
const char *prog = "/usr/bin/passwd";
char *const args[] = { "passwd", 0 };

execv (prog, args);
error (EXIT_FAILURE, errno, "execv: %s", args[0]);
}
}
userpasswd-0.2.10/src/conv.c000064400000000000000000000056231213362101700156720ustar00rootroot00000000000000
/*
Copyright (C) 2002 Stanislav Ievlev <inger@altlinux.org>
Copyright (C) 2002 Dmitry V. Levin <ldv@altlinux.org>

conversation

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <unistd.h>
#include <errno.h>
#include <error.h>
#include <sys/wait.h>
#include <libintl.h>

#include "userpasswd.h"

static pid_t child; /* child process PID */
static int child_rc; /* child return code */

/*
* handler to control return status of the child process
*/
static void
sigchld_handler (int signo)
{
int status;
pid_t old_child = child;

signal (SIGCHLD, SIG_IGN);
if (waitpid (child, &status, 0) != child)
error (EXIT_FAILURE, errno, "waitpid");

child = 0;

if (WIFEXITED (status))
{
if (WEXITSTATUS (status))
{
#ifdef DEBUG
printf ("child %d exited with return code %d.\n",
old_child, WEXITSTATUS (status));
#endif
child_rc = WEXITSTATUS (status);
return;
}
#ifdef DEBUG
printf ("child %d exited normally.\n", old_child);
#endif
return;
}

if (WIFSIGNALED (status))
{
error (EXIT_SUCCESS, errno,
"child %d terminated with signal %d.\n", old_child,
WTERMSIG (status));
child_rc = 128 + WTERMSIG (status);
return;
}
}

/*
* main conversation function
*/
int
do_conv (int master)
{
char *name = ptsname (master);

if (!name)
error (EXIT_FAILURE, errno, "ptsname");

#ifdef DEBUG
printf ("ptsname: %s\n", name);
#endif

signal (SIGCHLD, sigchld_handler);

child = fork ();
if (child < 0)
error (EXIT_FAILURE, errno, "fork");
if (!child)
{
signal (SIGCHLD, SIG_IGN);
do_child (name);
}

switch (do_parent (master))
{
case CONV_WAIT_CURRENT:
display_error (_("System configuration error."), 0);
break;
case CONV_WAIT_NEW:
display_error (_
("Wrong password.\nPlease try again."),
0);
return 2;
case CONV_WAIT_RETYPE:
display_error (_("Weak password.\nPlease try again."),
0);
return 2;
case CONV_DONE:
if (!child_rc)
{
display_message (_
("Password sucessully changed."),
0);
return EXIT_SUCCESS;
}
/* fall through */
default:
display_message (_("Password conversation error."),
0);
break;
}
return child_rc ? : EXIT_FAILURE;
}
userpasswd-0.2.10/src/loop.sh000064400000000000000000000015701213362101700160630ustar00rootroot00000000000000#!/bin/sh
#
# Copyright (C) 2003 Dmitry V. Levin <ldv@altlinux.org>
#
# Run userpasswd in loop.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#

rc=
while :; do
/usr/bin/userpasswd "$@"
rc=$?
[ $rc = 2 ] || break
done

exit $rc
userpasswd-0.2.10/src/main.c000064400000000000000000000026531213362101700156510ustar00rootroot00000000000000
/*
Copyright (C) 2002 Stanislav Ievlev <inger@altlinux.org>
Copyright (C) 2002 Dmitry V. Levin <ldv@altlinux.org>

passwd wrapper

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <error.h>
#include <libintl.h>
#include <gtk/gtkmain.h>
#include "userpasswd.h"

int
main (int argc, const char *argv[])
{
int master = getpt ();

if (master < 0)
error (EXIT_FAILURE, errno, "getpt");

if (grantpt (master) < 0)
error (EXIT_FAILURE, errno, "grantpt");

if (unlockpt (master) < 0)
error (EXIT_FAILURE, errno, "unlockpt");

textdomain (PACKAGE);
bindtextdomain (PACKAGE, LOCALEDIR);
bind_textdomain_codeset (PACKAGE, "UTF-8");

gtk_set_locale ();
gtk_init (&argc, (char ***) &argv);

return do_conv (master);
}
userpasswd-0.2.10/src/parent.c000064400000000000000000000065411213362101700162160ustar00rootroot00000000000000
/*
Copyright (C) 2002 Stanislav Ievlev <inger@altlinux.org>
Copyright (C) 2002 Dmitry V. Levin <ldv@altlinux.org>

parent handler

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <error.h>

#include "userpasswd.h"

static int
write_loop (int fd, const char *buffer, ssize_t count)
{
ssize_t offset = 0;

while (count > 0)
{
ssize_t block = write (fd, &buffer[offset], count);

if (block < 0)
{
if (errno == EINTR)
continue;
return block;
}
if (!block)
break;
offset += block;
count -= block;
}
return offset;
}

/*
* parent process
*/
conv_state
do_parent (int master)
{
conv_state state = CONV_WAIT_CURRENT;
ssize_t count;
char *new_pw = 0;
char masterbuf[BUFSIZ];

/*
* read and parse child output
*/
while ((count = read (master, masterbuf, sizeof (masterbuf) - 1)) > 0)
{
static const char str_current[] = "Enter current password:";
static const char str_new[] = "Enter new password:";
static const char str_retype[] = "Re-type new password:";

masterbuf[count] = '\0';
write (STDOUT_FILENO, masterbuf, count);

if (strstr (masterbuf, str_current))
{
if (CONV_WAIT_CURRENT == state)
{
char *pw = get_current_pw ();
size_t len = strlen (pw);

count = write_loop (master, pw, len);
memset (pw, 0, len);
free (pw);
if (count != len)
{
error (EXIT_SUCCESS,
errno,
"write current password to child");
return CONV_ERR;
}
state = CONV_WAIT_NEW;
} else
{
return CONV_ERR;
}
} else if (strstr (masterbuf, str_new))
{
if ((CONV_WAIT_CURRENT == state)
|| (CONV_WAIT_NEW == state))
{
size_t len;

new_pw = get_new_pw ();
len = strlen (new_pw);

if (write_loop (master, new_pw, len) != len)
{
memset (new_pw, 0, len);
free (new_pw);
new_pw = 0;
error (EXIT_SUCCESS,
errno,
"write new password to child");
return CONV_ERR;
}
state = CONV_WAIT_RETYPE;
} else if (CONV_WAIT_RETYPE == state)
{
return CONV_WAIT_RETYPE;
} else
{
return CONV_ERR;
}
} else if (strstr (masterbuf, str_retype))
{
if (CONV_WAIT_RETYPE == state)
{
size_t len;

if (!new_pw)
new_pw = get_new_pw ();
len = strlen (new_pw);

if (write_loop (master, new_pw, len) != len)
{
memset (new_pw, 0, len);
free (new_pw);
new_pw = 0;
error (EXIT_SUCCESS,
errno,
"write retype password to child");
return CONV_ERR;
}
state = CONV_DONE;
} else
{
return CONV_ERR;
}
}
}

return state;
}
userpasswd-0.2.10/src/ui.c000064400000000000000000000154621213362101700153440ustar00rootroot00000000000000
/*
Copyright (C) 2002,2003 Stanislav Ievlev <inger@altlinux.org>
Copyright (C) 2002-2005 Dmitry V. Levin <ldv@altlinux.org>

interface functions for passwd wrapper

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include <stdio.h>
#include <errno.h>
#include <error.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>

#include <locale.h>
#include <libintl.h>

#include <gtk/gtk.h>
#include <gdk/gdkx.h>

#include "userpasswd.h"

#define PIXMAP_PREFIX "/usr/share/pixmaps/userpasswd-"

/*
* display dialog with some messages
*/
static void
display_dialog (const char *pixname, const char *message, const char *title)
{
GtkWidget *window, *hbox, *pix, *label;

if (!message)
return;

/* window */
window = gtk_dialog_new_with_buttons (title ? :
program_invocation_short_name,
NULL, 0, GTK_STOCK_OK,
GTK_RESPONSE_ACCEPT, NULL);

gtk_window_set_resizable (GTK_WINDOW (window), 0);
gtk_window_set_decorated (GTK_WINDOW (window), 1);
gtk_window_set_position (GTK_WINDOW (window),
GTK_WIN_POS_CENTER_ALWAYS);
gtk_window_set_keep_above (GTK_WINDOW (window), 1);

/* hbox */
hbox = gtk_hbox_new (1, 0);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), hbox, 0, 0,
5);

/* pixmap */
pix = gtk_image_new_from_file (pixname);
gtk_box_pack_start (GTK_BOX (hbox), pix, 0, 0, 5);

/* label */
label = gtk_label_new (message);
gtk_box_pack_end (GTK_BOX (hbox), label, 0, 0, 5);

/* run */
gtk_widget_show_all (window);
gtk_dialog_run (GTK_DIALOG (window));
gtk_widget_destroy (window);

return;
}

void
display_message (const char *message, const char *title)
{
display_dialog (PIXMAP_PREFIX "info.png", message, title);
}

void
display_error (const char *message, const char *title)
{
display_dialog (PIXMAP_PREFIX "critical.png", message, title);
}

static void
ungrab_focus (void)
{
gdk_keyboard_ungrab (GDK_CURRENT_TIME);
gdk_pointer_ungrab (GDK_CURRENT_TIME);
gdk_flush ();
}

volatile static sig_atomic_t timed_out;

void
alarm_handler (int signo)
{
timed_out = 1;
}

static void
grab_focus (GtkWidget * widget)
{
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
struct sigaction action;

action.sa_handler = alarm_handler;
action.sa_flags = SA_RESTART;
sigemptyset (&action.sa_mask);

if (sigaction (SIGALRM, &action, 0) < 0)
error (EXIT_FAILURE, errno, "sigaction");

timed_out = 0;
alarm (1);
while (!timed_out)
{
if (!gdk_pointer_grab
(toplevel->window, TRUE, 0, NULL, NULL, GDK_CURRENT_TIME))
{
alarm (0);
timed_out = 0;
break;
}
}

if (timed_out)
{
ungrab_focus ();
error (EXIT_FAILURE, 0, "Could not grab pointer");
}

timed_out = 0;
alarm (1);
while (!timed_out)
{
if (!gdk_keyboard_grab
(toplevel->window, FALSE, GDK_CURRENT_TIME))
{
alarm (0);
timed_out = 0;
break;
}
}

if (timed_out)
{
ungrab_focus ();
error (EXIT_FAILURE, 0, "Could not grab keyboard");
}
}

/*
* ask for password
*/
static char *
get_pw (const char *title, const char *message, const char *prompt,
const char *pixfile)
{
GtkWidget *window;
GtkWidget *entry, *entry_label, *entry_hbox;
GtkWidget *pix, *message_label, *message_hbox;

char *pw = 0;
void entry_activated (GtkDialog * dialog)
{
gtk_dialog_response (dialog, GTK_RESPONSE_ACCEPT);
}

/* window */
window = gtk_dialog_new_with_buttons (title ? :
program_invocation_short_name,
NULL, GTK_DIALOG_MODAL,
GTK_STOCK_OK,
GTK_RESPONSE_ACCEPT,
GTK_STOCK_CANCEL,
GTK_RESPONSE_REJECT, NULL);

gtk_window_set_resizable (GTK_WINDOW (window), 0);
gtk_window_set_decorated (GTK_WINDOW (window), 1);
gtk_window_set_keep_above (GTK_WINDOW (window), 1);
gtk_window_set_position (GTK_WINDOW (window),
GTK_WIN_POS_CENTER_ALWAYS);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);

/* message_hbox */
message_hbox = gtk_hbox_new (1, 5);

/* pixmap */
pix = gtk_image_new_from_file (pixfile);
gtk_box_pack_start (GTK_BOX (message_hbox), pix, 0, 0, 0);

/* message_label */
message_label = gtk_label_new (message);
gtk_box_pack_end (GTK_BOX (message_hbox), message_label, 0, 0, 5);

/* entry_hbox */
entry_hbox = gtk_hbox_new (1, 5);

/* entry_label */
entry_label = gtk_label_new (prompt);
gtk_box_pack_start (GTK_BOX (entry_hbox), entry_label, 0, 0, 5);

/* entry */
entry = gtk_entry_new ();
gtk_box_pack_end (GTK_BOX (entry_hbox), entry, 0, 0, 5);
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
gtk_signal_connect_object (GTK_OBJECT (entry), "activate",
(GtkSignalFunc) entry_activated,
(gpointer) GTK_DIALOG (window));

/* window */
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), message_hbox,
0, 0, 5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), entry_hbox,
0, 0, 5);
gtk_widget_grab_focus (entry);
g_signal_connect (G_OBJECT (window), "map_event",
G_CALLBACK (grab_focus), (gpointer) window);

gtk_widget_show_all (window);
int rc = gtk_dialog_run (GTK_DIALOG (window));

if (rc == GTK_RESPONSE_ACCEPT)
{
if (asprintf
(&pw, "%s\n", gtk_entry_get_text (GTK_ENTRY (entry))) < 0)
error (EXIT_FAILURE, errno, "asprintf");
gtk_entry_set_text (GTK_ENTRY (entry), "");
#ifdef DEBUG
printf ("pw entered: %s", pw);
#endif
}

gtk_widget_destroy (window);

ungrab_focus ();

return pw;
}

/*
* ask current user password
*/
char *
get_current_pw ()
{
char *pw = get_pw (_("Current password"),
_("Please enter your\ncurrent password first"),
_("Enter current password:"),
PIXMAP_PREFIX "keyring.png");

if (!pw)
exit (1);

return pw;
}

/*
* ask for the new user password
*/
char *
get_new_pw ()
{
char *pw1, *pw2;

pw1 = get_pw (_("New password"),
_("Now enter your\nnew password twice"),
_("Enter new password:"), PIXMAP_PREFIX "keyring.png");
if (!pw1)
exit (1);

pw2 = get_pw (_("Re-type password"),
_("Now enter your\nnew password twice"),
_("Re-type new password:"),
PIXMAP_PREFIX "keyring.png");
if (!pw2)
exit (1);

if (strcmp (pw1, pw2))
{
display_error (_
("Sorry, passwords do not match.\nPlease try again."),
0);
exit (2);
}
free (pw2);
return pw1;
}
userpasswd-0.2.10/src/userpasswd.h000064400000000000000000000027711213362101700171330ustar00rootroot00000000000000
/*
Copyright (C) 2002 Stanislav Ievlev <inger@altlinux.org>
Copyright (C) 2002 Dmitry V. Levin <ldv@altlinux.org>

definitions of interface functions for passwd wrapper

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef USERPASSWD_H__
#define USERPASSWD_H__

#ifndef PACKAGE
#define PACKAGE "userpasswd"
#endif

#ifndef LOCALEDIR
#define LOCALEDIR "/usr/share/locale"
#endif

#define _(arg) gettext(arg)

typedef enum
{
CONV_DONE = 0,
CONV_WAIT_CURRENT,
CONV_WAIT_NEW,
CONV_WAIT_RETYPE,
CONV_ERR
}
conv_state;

int do_conv (int master);
conv_state do_parent (int master);
void do_child (const char *ptsname) __attribute__ ((noreturn));

char *get_current_pw ();
char *get_new_pw ();

void display_message (const char *message, const char *title);
void display_error (const char *message, const char *title);

#endif /* USERPASSWD_H__ */
userpasswd-0.2.10/userpasswd.spec000064400000000000000000000226761213362101700170550ustar00rootroot00000000000000Name: userpasswd
Version: 0.2.10
Release: alt3.qa1

Group: System/Configuration/Other
Summary: The graphical tool for changing password
License: GPLv2+
Packager: Dmitry V. Levin <ldv@altlinux.org>

Source: %name-%version.tar

Conflicts: usermode
BuildRequires: libgtk+2-devel

%description
Install this package if you would like to provide users with
graphical tool for changing password.

%prep
%setup -q

%build
%make_build

%install
%make_install install menudir=%_desktopdir

%find_lang %name

%files -f %name.lang
%_bindir/*
%_datadir/%name
%_desktopdir/*
%_datadir/pixmaps/*

%changelog
* Wed Apr 17 2013 Dmitry V. Levin (QA) <qa_ldv@altlinux.org> 0.2.10-alt3.qa1
- NMU: rebuilt for debuginfo.

* Wed Sep 09 2009 Sergey V Turchin <zerg@altlinux.org> 0.2.10-alt3
- using desktop-file for applications menu (closes: 21505)

* Sun Dec 14 2008 Dmitry V. Levin <ldv@altlinux.org> 0.2.10-alt2
- Removed obsolete %%update_menus/%%clean_menus calls.

* Wed Oct 29 2008 Dmitry V. Levin <ldv@altlinux.org> 0.2.10-alt1
- Fixed build with fresh glibc.

* Tue Mar 07 2006 Dmitry V. Levin <ldv@altlinux.org> 0.2.9-alt1
- Fixed build with --as-needed.

* Mon Nov 21 2005 Dmitry V. Levin <ldv@altlinux.org> 0.2.8.2-alt1
- Relocated %_libdir/%name to %_datadir/%name (fixes #8506).

* Wed Jun 22 2005 Dmitry V. Levin <ldv@altlinux.org> 0.2.8.1-alt1
- Corrected potential bug introduced in previous release.

* Mon Apr 18 2005 Dmitry V. Levin <ldv@altlinux.org> 0.2.8-alt1
- Updated ui code for GTK2.

* Thu Feb 26 2004 Dmitry V. Levin <ldv@altlinux.org> 0.2.7-alt3
- Rebuilt.

* Thu May 08 2003 Stanislav Ievlev <inger@altlinux.ru> 0.2.7-alt2
- more beautiful icons

* Wed Feb 05 2003 Dmitry V. Levin <ldv@altlinux.org> 0.2.7-alt1
- Set dialog type to GTK_WINDOW_POPUP.
- Activate passwd entry widget by default.

* Mon Jan 27 2003 Dmitry V. Levin <ldv@altlinux.org> 0.2.6-alt1
- Added loop script for menu.

* Sat Oct 12 2002 Dmitry V. Levin <ldv@altlinux.org> 0.2.5-alt1
- 0.2.5 (fixed gtk_widget_grab_default problem).

* Wed Oct 09 2002 Stanislav Ievlev <inger@altlinux.ru> 0.2.4-alt2
- Rebuilt with gtk 2.1

* Thu Sep 19 2002 Stanislav Ievlev <inger@altlinux.ru> 0.2.4-alt1
- Moved to gtk2.
- Added buildrequires.

* Fri Jun 21 2002 Dmitry V. Levin <ldv@altlinux.org> 0.2.3-alt1
- 0.2.3

* Fri Jun 07 2002 Stanislav Ievlev <inger@altlinux.ru> 0.2.2-alt2
- fixed suxx centering

* Tue Mar 19 2002 Dmitry V. Levin <ldv@alt-linux.org> 0.2.2-alt1
- 0.2.2

* Sun Mar 17 2002 Dmitry V. Levin <ldv@alt-linux.org> 0.2.1-alt1
- Dropped all but userpasswd.
- Added grab focus logic.

* Wed Feb 27 2002 Stanislav Ievlev <inger@altlinux.ru> 1.43-alt2
- added true version of userpasswd
- dropped usermount and userinfo

* Wed Sep 19 2001 Dmitry V. Levin <ldv@altlinux.ru> 1.43-alt1
- 1.43 (updated translations).

* Mon Aug 27 2001 Dmitry V. Levin <ldv@altlinux.ru> 1.42-alt3
- Provides: consolehelper (until real consolehelper package appearance).

* Fri Aug 24 2001 Dmitry V. Levin <ldv@altlinux.ru> 1.42-alt2
- Fixed latest sanitize_env patch.

* Wed Aug 22 2001 Dmitry V. Levin <ldv@altlinux.ru> 1.42-alt1
- Specfile cleanup.
- Dropped outdated translations from mdk coz original are better.
- Dropped outdated mdk patches.
- Moved SysVinit stuff back to SysVinit package.
- Relocated %_sbindir/userhelper and %_bindir/consolehelper
to %_libdir/helper/ according to FHS.
- Added progname patch.
- Added sanitize_env patch.
- Added getlogin patch.
Here we need at most consolehelper and gui wrappers,
all the rest will go into shadow-utils or like.

* Wed Jul 11 2001 Frederic Crozat <fcrozat@mandrakesoft.com> 1.42-2mdk
- Use more macros
- Remove source 1, 2 + menu entry (not needed)
- Shutdown tools are back (conflict with msec < 0.15-17mdk)
- Call msec at install time if installed

* Tue May 22 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.42-1mdk
- Bump a nice and tasty 1.42 out for cooker.
- s/Copyright/License/;

* Tue Apr 10 2001 Frederic Crozat <fcrozat@mandrakesoft.com> 1.37-5mdk
- Update patch 2 for better INITIAL_USER handling

* Mon Apr 09 2001 Pablo Saratxaga <pablo@mandrakesoft.com> 1.37-4mdk
- included latest translations

* Tue Apr 3 2001 Frederic Crozat <fcrozat@mandrakesoft.com> 1.37-3mdk
- Update patch 2 to set INITIAL_USER and BROWSER variable

* Wed Nov 29 2000 Geoffrey lee <snailtalk@mandrakesoft.com> 1.37-2mdk
- use optflags.

* Fri Nov 10 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.37-1mdk
- bump up version for security fix. (RH).

* Tue Oct 10 2000 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.36-2mdk
- patch to set some more environment variables

* Tue Oct 10 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.36-1mdk
- bump up version for security fix. (RH)

* Mon Oct 9 2000 Pablo Saratxaga <pablo@mandrakesoft.com> 1.35-5mdk
- updated French, Spanish, etc. translations

* Mon Oct 9 2000 Pablo Saratxaga <pablo@mandrakesoft.com> 1.35-4mdk
- included translations into the rpm; and added new ones (new ones still
very incomplete)

* Mon Oct 9 2000 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.35-3mdk
- set gid also when no session

* Fri Oct 6 2000 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.35-2mdk
- patch in userhelper to set gid when executing a foreign program
(-w option) (thanks to Fred Lepied)

* Thu Sep 28 2000 Frederic Crozat <fcrozat@mandrakesoft.com> 1.35-1mdk
- Release 1.35

* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.22-4mdk
- automatically added BuildRequires

* Wed Aug 02 2000 Stefan van der Eijk <s.vandereijk@chello.nl> 1.22-3mdk
- macroszifications
- Makefile patch for new manpage location
- BM

* Tue Jul 18 2000 Vincent Danen <vdanen@mandrakesoft.com> 1.22-2mdk
- remove pam console wrappers (security fix)

* Sat Apr 08 2000 Christopher Molnar <molnarc@mandrakesoft.com> 1.22-1mdk
- updated to new version
- updated group information
- added menu code
- There are no doc files available.

* Thu Mar 09 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix problem parsing userhelper's -w flag with other args

* Wed Mar 08 2000 Nalin Dahyabhai <nalin@redhat.com>
- ignore read() == 0 because the child exits

* Tue Mar 07 2000 Nalin Dahyabhai <nalin@redhat.com>
- queue notice messages until we get prompts in userhelper to fix bug #8745

* Fri Feb 03 2000 Nalin Dahyabhai <nalin@redhat.com>
- free trip through the build system

* Tue Jan 11 2000 Nalin Dahyabhai <nalin@redhat.com>
- grab keyboard input focus for dialogs

* Fri Jan 07 2000 Michael K. Johnson <johnsonm@redhat.com>
- The root exploit fix created a bug that only showed up in certain
circumstances. Unfortunately, we didn't test in those circumstances...

* Mon Jan 03 2000 Michael K. Johnson <johnsonm@redhat.com>
- fixed local root exploit

* Thu Sep 30 1999 Michael K. Johnson <johnsonm@redhat.com>
- fixed old complex broken gecos parsing, replaced with simple working parsing
- can now blank fields (was broken by previous fix for something else...)

* Tue Sep 21 1999 Michael K. Johnson <johnsonm@redhat.com>
- FALLBACK/RETRY in consolehelper/userhelper
- session management fixed for consolehelper/userhelper SESSION=true
- fix memory leak and failure to close in error condition (#3614)
- fix various bugs where not all elements in userinfo got set

* Mon Sep 20 1999 Michael K. Johnson <johnsonm@redhat.com>
- set $HOME when acting as consolehelper
- rebuild against new pwdb

* Tue Sep 14 1999 Michael K. Johnson <johnsonm@redhat.com>
- honor "owner" flag to mount
- ask for passwords with username

* Tue Jul 06 1999 Bill Nottingham <notting@redhat.com>
- import pam_console wrappers from SysVinit, since they require usermode

* Mon Apr 12 1999 Michael K. Johnson <johnsonm@redhat.com>
- even better check for X availability

* Wed Apr 07 1999 Michael K. Johnson <johnsonm@redhat.com>
- better check for X availability
- center windows to make authentication easier (improve later with
transients and embedded windows where possible)
- applink -> applnk
- added a little padding, especially important when running without
a window manager, as happens when running from session manager at
logout time

* Wed Mar 31 1999 Michael K. Johnson <johnsonm@redhat.com>
- hm, need to be root...

* Fri Mar 19 1999 Michael K. Johnson <johnsonm@redhat.com>
- updated userhelper.8 man page for consolehelper capabilities
- moved from wmconfig to desktop entries

* Thu Mar 18 1999 Michael K. Johnson <johnsonm@redhat.com>
- added consolehelper
- Changed conversation architecture to follow PAM spec

* Wed Mar 17 1999 Bill Nottingham <notting@redhat.com>
- remove gdk_input_remove (causing segfaults)

* Tue Jan 12 1999 Michael K. Johnson <johnsonm@redhat.com>
- fix missing include files

* Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com>
- strip binaries
- use defattr
- fix spec file ( rm -rf $(RPM_BUILD_ROOT) is a stupid thing to do ! )

* Tue Oct 06 1998 Preston Brown <pbrown@redhat.com>
- fixed so that the close button on window managers quits the program properly

* Thu Apr 16 1998 Erik Troan <ewt@redhat.com>
- use gtk-config during build
- added make archive rule to Makefile
- uses a build root

* Fri Nov 7 1997 Otto Hammersmith <otto@redhat.com>
- new version that fixed memory leak bug.

* Mon Nov 3 1997 Otto Hammersmith <otto@redhat.com>
- updated version to fix bugs

* Fri Oct 17 1997 Otto Hammersmith <otto@redhat.com>
- Wrote man pages for userpasswd and userhelper.

* Tue Oct 14 1997 Otto Hammersmith <otto@redhat.com>
- Updated the packages... now includes userpasswd for changing passwords
and newer versions of usermount and userinfo. No known bugs or
misfeatures.
- Fixed the file list...

* Mon Oct 6 1997 Otto Hammersmith <otto@redhat.com>
- Created the spec file.
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin