tinycm rev 20

Auth file can be used by an other app
author Christophe Lincoln <pankso@slitaz.org>
date Sun Jan 05 01:25:55 2014 +0100 (2014-01-05)
parents 93e27f9ededd
children 8dacfbea4e2f
files Makefile index.cgi
line diff
     1.1 --- a/Makefile	Sun Jan 05 01:20:24 2014 +0100
     1.2 +++ b/Makefile	Sun Jan 05 01:25:55 2014 +0100
     1.3 @@ -47,8 +47,8 @@
     1.4  	#cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
     1.5  	
     1.6  	# Auth system may be used by an other app
     1.7 -	touch $(DESTDIR)$(LOGIN)/auth/people
     1.8 -	chmod 0600 $(DESTDIR)$(LOGIN)/auth/people
     1.9 +	#touch $(DESTDIR)$(LOGIN)/auth/people
    1.10 +	#chmod 0600 $(DESTDIR)$(LOGIN)/auth/people
    1.11  	chown -R www.www $(DESTDIR)$(LOGIN)/auth
    1.12  	chown -R www.www $(DESTDIR)$(LOGIN)/people
    1.13  	chown www.www $(DESTDIR)$(WEB)/content
     2.1 --- a/index.cgi	Sun Jan 05 01:20:24 2014 +0100
     2.2 +++ b/index.cgi	Sun Jan 05 01:25:55 2014 +0100
     2.3 @@ -222,6 +222,10 @@
     2.4  
     2.5  # Create a new user in AUTH_FILE and PEOPLE
     2.6  new_user_config() {
     2.7 +	if [ ! -f "$AUTH_FILE" ];then
     2.8 +		touch $(DESTDIR)$(LOGIN)/auth/people
     2.9 +		chmod 0600 $(DESTDIR)$(LOGIN)/auth/people
    2.10 +	fi
    2.11  	key=$(echo -n "$user:$mail:$pass" | md5sum | awk '{print $1}')
    2.12  	echo "$user:$pass" >> $AUTH_FILE
    2.13  	mkdir -p $PEOPLE/$user/