* fixed #3, builtsystem didnt use 'shadow'
--HG-- extra : convert_revision : svn%3Aeebe1cee-a9af-4fe4-bd26-ad572b19c5ab/trunk%4055
This commit is contained in:
parent
df4ba8bd8b
commit
c4548efce3
4 changed files with 30 additions and 14 deletions
|
@ -1,5 +1,9 @@
|
|||
Version 1.0
|
||||
----------------------------------------------------------------------
|
||||
2006-09-19:
|
||||
* fixed #3, buildsystem doesnt built with shadow-support
|
||||
* added missing xcursors, updated docs
|
||||
|
||||
2006-09-18:
|
||||
* fixed #2, missing includes in Xrender check
|
||||
* fixed --enable-imlib2 wasnt implying --enable-xrender
|
||||
|
|
15
Makefile
15
Makefile
|
@ -36,12 +36,23 @@ install : alock
|
|||
$(DESTDIR)$(prefix)/share/alock/bitmaps/
|
||||
chmod 444 $(DESTDIR)$(prefix)/share/alock/xcursors/*
|
||||
chmod 444 $(DESTDIR)$(prefix)/share/alock/bitmaps/*
|
||||
cp -fv README LICENSE CHANGELOG \
|
||||
cp -fv README.txt LICENSE.txt CHANGELOG.txt \
|
||||
$(DESTDIR)$(prefix)/share/alock/
|
||||
chmod 444 $(DESTDIR)$(prefix)/share/alock/README.txt
|
||||
chmod 444 $(DESTDIR)$(prefix)/share/alock/LICENSE.txt
|
||||
chmod 444 $(DESTDIR)$(prefix)/share/alock/CHANGELOG.txt
|
||||
|
||||
@if `src/alock -auth list | grep passwd > /dev/null`; then \
|
||||
echo ",-------------------------------------------------,"; \
|
||||
echo "| it seems that you have compiled 'alock' with |"; \
|
||||
echo "| 'shadow' support. to use that binary you have |"; \
|
||||
echo "| set the 'suid' - bit, something like: |"; \
|
||||
echo "| |"; \
|
||||
echo "| $$> chown root:root \$$prefix/bin/alock |";\
|
||||
echo "| $$> chmod 4111 \$$prefix/bin/alock |";\
|
||||
echo "| |"; \
|
||||
echo "| if not you ll get 'permission denied' problems. |"; \
|
||||
echo "\`-------------------------------------------------'";\
|
||||
fi
|
||||
|
||||
alock :
|
||||
$(MAKE) -C src
|
||||
|
|
1
configure
vendored
1
configure
vendored
|
@ -266,6 +266,7 @@ check_passwd() {
|
|||
echo "configure for passwd."
|
||||
echo "#_______________________" >&4
|
||||
echo "WITH_PASSWD:=1" >&4
|
||||
echo "CFLAGS_PASSWD:=-DHAVE_SHADOW" >&4
|
||||
echo "LIBS_PASSWD=-lcrypt" >&4
|
||||
echo "" >&4
|
||||
}
|
||||
|
|
|
@ -35,9 +35,9 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef SHADOW_PWD
|
||||
#ifdef HAVE_SHADOW
|
||||
# include <shadow.h>
|
||||
#endif /* SHADOW_PWD */
|
||||
#endif /* HAVE_SHADOW */
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
|
@ -48,10 +48,6 @@ static struct passwd* pwd_entry = NULL;
|
|||
|
||||
static int alock_auth_passwd_init(const char* args) {
|
||||
|
||||
#ifdef SHADOW_PWD
|
||||
struct spwd* sp = NULL;
|
||||
#endif
|
||||
|
||||
errno = 0;
|
||||
pwd_entry = getpwuid(getuid());
|
||||
if (!pwd_entry) {
|
||||
|
@ -59,11 +55,15 @@ static int alock_auth_passwd_init(const char* args) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef SHADOW_PWD
|
||||
sp = getspnam(pwd_entry->pw_name);
|
||||
if (sp)
|
||||
pwd_entry->pw_passwd = sp->sp_pwdp;
|
||||
endspent();
|
||||
#ifdef HAVE_SHADOW
|
||||
{
|
||||
struct spwd* sp = NULL;
|
||||
|
||||
sp = getspnam(pwd_entry->pw_name);
|
||||
if (sp)
|
||||
pwd_entry->pw_passwd = sp->sp_pwdp;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
/* we can be installed setuid root to support shadow passwords,
|
||||
|
|
Reference in a new issue