* added new auth method: wpool, hash-based authentification

* minor tweaks to buildsystem and standalones
  using the whirlpool hash algorithm

--HG--
extra : convert_revision : svn%3Aeebe1cee-a9af-4fe4-bd26-ad572b19c5ab/trunk%4057
This commit is contained in:
mathias 2006-09-22 07:27:29 +00:00
parent 9d3bbc2c2e
commit 690be9684e
5 changed files with 1367 additions and 7 deletions

View file

@ -1,5 +1,11 @@
Version 1.0
----------------------------------------------------------------------
2006-09-22:
* added new auth method: wpool, hash-based authentification
using the whirlpool hash algorithm
* minor tweaks to buildsystem and standalones
* cosmetic issues on some files (fprintf, etc)
2006-09-19:
* fixed #3, buildsystem doesnt built with shadow-support
* added missing xcursors, updated docs

View file

@ -15,6 +15,11 @@ define funcAddModule
endif
endef
define funcStandalone
a$(1) : auth_$(1).c
$$(CC) -o $$@ -DSTAND_ALONE $$(CFLAGS) $$<
endef
##########################
MAKEDEP ?= gcc -MM
CC ?= gcc
@ -31,7 +36,8 @@ SRC_PAM = auth_pam.c
SRC_PASSWD = auth_passwd.c
SRC_HASH = auth_sha1.c \
auth_sha2.c \
auth_md5.c
auth_md5.c \
auth_wpool.c
SRC_XRENDER = bg_shade.c
SRC_IMLIB2 = cursor_image.c \
bg_image.c
@ -41,6 +47,7 @@ SRC_XCURSOR = cursor_xcursor.c
######################
MODULES = PAM PASSWD HASH XRENDER XCURSOR IMLIB2 XPM
STAND_ALONES = $(subst auth_,,$(SRC_HASH:.c=))
$(foreach module,$(MODULES),$(eval $(call funcAddModule,$(module))))
@ -57,13 +64,19 @@ TARGET = alock
$(TARGET) : $(OBJECTS)
$(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBS)
standalones : $(foreach s,$(STAND_ALONES), a$(s))
$(foreach s,$(STAND_ALONES),$(eval $(call funcStandalone,$(s))))
alock.o : ../config.mk
clean:
@rm -f *.o
@rm -fv *.o
distclean:
rm -f $(TARGET) *.o *.d
rm -fv $(TARGET) $(foreach binary,$(STAND_ALONES),a$(binary)) *.o .*.d
deps: $(DEPS)

View file

@ -18,7 +18,7 @@ build = alock_env.Copy()
if build['passwd']:
auth_sources += [ 'auth_passwd.c' ]
if build['hash']:
auth_sources += [ 'auth_md5.c', 'auth_sha1.c', 'auth_sha2.c' ]
auth_sources += [ 'auth_md5.c', 'auth_sha1.c', 'auth_sha2.c', 'auth_wpool' ]
if build['pam']:
auth_sources += [ 'auth_pam.c' ]
@ -47,8 +47,14 @@ if build['asha1']:
sha1.Program('asha1', sha1.StaticObject(target = 'asha1', source = 'auth_sha1.c'))
if build['asha2']:
sha1 = Environment()
sha1.AppendUnique(CPPDEFINES = [ 'STAND_ALONE' ])
sha1.Program('asha2', sha1.StaticObject(target = 'asha2', source = 'auth_sha2.c'))
sha2 = Environment()
sha2.AppendUnique(CPPDEFINES = [ 'STAND_ALONE' ])
sha2.Program('asha2', sha2.StaticObject(target = 'asha2', source = 'auth_sha2.c'))
if build['awpool']:
wpool = Environment()
wpool.AppendUnique(CPPDEFINES = [ 'STAND_ALONE' ])
wpool.Program('awpool', wpool.StaticObject(target = 'apool', source = 'auth_wpool.c'))
# vim:ft=python

View file

@ -40,6 +40,7 @@ extern struct aAuth alock_auth_sha1;
extern struct aAuth alock_auth_sha256;
extern struct aAuth alock_auth_sha384;
extern struct aAuth alock_auth_sha512;
extern struct aAuth alock_auth_wpool;
#endif /* HAVE_HASH */
#ifdef HAVE_PASSWD
extern struct aAuth alock_auth_passwd;
@ -62,6 +63,7 @@ static struct aAuth* alock_authmodules[] = {
&alock_auth_sha256,
&alock_auth_sha384,
&alock_auth_sha512,
&alock_auth_wpool,
#endif /* HAVE_HASH */
NULL
};

1333
src/auth_wpool.c Normal file

File diff suppressed because it is too large Load diff