changed: when winix demonizes it creates a three new descriptors (0, 1 and 3)
pointing to /dev/null
added: DbBase::AssertValueBin(PGresult * r, int row, int col, std::string & result)
it reads binary (bytea) data
added: DbTextStream can handle 'bool' types now
(is puts 'true' of 'false' to the stream)
changed: now passwords can be stored either as plain text, a hash or can be encrypted
with RSA
currently we have following hashes:
md4, md5, sha1, sha224, sha256, sha384, sha512
we are using openssl to manage them
(look at config options for more info)
changed: winix version to 0.4.7
added: class Run - you can run any program from os and send a buffer to its standard input
and read what the program put on its standard output
added: class Crypt (in System) - calculating hashes, and crypting/decrypting
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@734 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
+119
-105
@@ -24,9 +24,9 @@ adduser.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
adduser.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
adduser.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
adduser.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h
|
||||
adduser.o: ../core/mount.h ../core/mountparser.h ../core/users.h
|
||||
adduser.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
adduser.o: ../core/basethread.h ../core/synchro.h
|
||||
adduser.o: ../core/mount.h ../core/mountparser.h ../core/crypt.h
|
||||
adduser.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
adduser.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
cat.o: cat.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
cat.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
cat.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -50,8 +50,8 @@ cat.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
cat.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
cat.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
cat.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h ../core/mount.h
|
||||
cat.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
cat.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
cat.o: ../core/mountparser.h ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
cat.o: ../core/group.h ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
cat.o: ../core/synchro.h
|
||||
chmod.o: chmod.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
chmod.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
@@ -77,8 +77,9 @@ chmod.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
chmod.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
||||
chmod.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
chmod.o: ../core/cur.h ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
chmod.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
chmod.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
chmod.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
chmod.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
chmod.o: ../core/synchro.h
|
||||
chown.o: chown.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
chown.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
chown.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -103,8 +104,9 @@ chown.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
chown.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
||||
chown.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
chown.o: ../core/cur.h ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
chown.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
chown.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
chown.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
chown.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
chown.o: ../core/synchro.h
|
||||
ckeditor.o: ckeditor.h functionbase.h ../core/item.h ../db/db.h
|
||||
ckeditor.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
ckeditor.o: ../core/textstream.h ../core/misc.h ../core/item.h
|
||||
@@ -130,9 +132,10 @@ ckeditor.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
ckeditor.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
ckeditor.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
ckeditor.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h
|
||||
ckeditor.o: ../core/mount.h ../core/mountparser.h ../core/users.h
|
||||
ckeditor.o: ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
ckeditor.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
ckeditor.o: ../core/mount.h ../core/mountparser.h ../core/crypt.h
|
||||
ckeditor.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
ckeditor.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
ckeditor.o: ../core/synchro.h
|
||||
cp.o: cp.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
cp.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
cp.o: ../core/item.h ../core/error.h ../core/log.h ../core/textstream.h
|
||||
@@ -156,8 +159,8 @@ cp.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
cp.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
cp.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
cp.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h ../core/mount.h
|
||||
cp.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
cp.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
cp.o: ../core/mountparser.h ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
cp.o: ../core/group.h ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
cp.o: ../core/synchro.h ../core/misc.h
|
||||
default.o: default.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
default.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
@@ -183,9 +186,9 @@ default.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
default.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
default.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
default.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h
|
||||
default.o: ../core/mount.h ../core/mountparser.h ../core/users.h
|
||||
default.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
default.o: ../core/basethread.h ../core/synchro.h
|
||||
default.o: ../core/mount.h ../core/mountparser.h ../core/crypt.h
|
||||
default.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
default.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
download.o: download.h functionbase.h ../core/item.h ../db/db.h
|
||||
download.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
download.o: ../core/textstream.h ../core/misc.h ../core/item.h
|
||||
@@ -211,9 +214,10 @@ download.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
download.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
download.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
download.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h
|
||||
download.o: ../core/mount.h ../core/mountparser.h ../core/users.h
|
||||
download.o: ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
download.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
download.o: ../core/mount.h ../core/mountparser.h ../core/crypt.h
|
||||
download.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
download.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
download.o: ../core/synchro.h
|
||||
emacs.o: emacs.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
emacs.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
emacs.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -238,11 +242,12 @@ emacs.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
emacs.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
||||
emacs.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
emacs.o: ../core/cur.h ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
emacs.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
emacs.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
emacs.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
emacs.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
emacs.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h
|
||||
emacs.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
emacs.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
emacs.o: ../core/synchro.h ../templates/templates.h
|
||||
emacs.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
|
||||
emacs.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
emacs.o: ../templates/indexpatterns.h ../core/sessionmanager.h
|
||||
emacs.o: ../core/sessioncontainer.h ../core/system.h
|
||||
functionbase.o: functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
functionbase.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
@@ -272,9 +277,9 @@ functionbase.o: ../core/basethread.h ../core/synchro.h
|
||||
functionbase.o: ../notify/templatesnotify.h ../core/users.h
|
||||
functionbase.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/cur.h
|
||||
functionbase.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
functionbase.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
functionbase.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
functionbase.o: ../core/synchro.h
|
||||
functionbase.o: ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
functionbase.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
functionbase.o: ../core/basethread.h ../core/synchro.h
|
||||
functionparser.o: functionparser.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
|
||||
functionparser.o: ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
functionparser.o: ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -304,9 +309,9 @@ functionparser.o: ../core/basethread.h ../core/synchro.h
|
||||
functionparser.o: ../notify/templatesnotify.h ../core/users.h
|
||||
functionparser.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/cur.h
|
||||
functionparser.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
functionparser.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
functionparser.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
functionparser.o: ../core/log.h
|
||||
functionparser.o: ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
functionparser.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
functionparser.o: ../core/basethread.h ../core/log.h
|
||||
functions.o: functions.h functionbase.h ../core/item.h ../db/db.h
|
||||
functions.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
functions.o: ../core/textstream.h ../core/misc.h ../core/item.h
|
||||
@@ -327,21 +332,22 @@ functions.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
functions.o: ../notify/templatesnotify.h ../core/users.h ../core/user.h
|
||||
functions.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/cur.h
|
||||
functions.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
functions.o: ../core/users.h ../core/groups.h ../core/group.h ../core/rebus.h
|
||||
functions.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
functions.o: ../core/synchro.h functionparser.h ../core/cur.h
|
||||
functions.o: ../core/session.h ../core/plugindata.h adduser.h cat.h chmod.h
|
||||
functions.o: privchanger.h chown.h ckeditor.h cp.h default.h download.h
|
||||
functions.o: emacs.h last.h login.h logout.h ln.h ls.h mkdir.h mv.h node.h
|
||||
functions.o: priv.h reload.h rm.h run.h specialdefault.h stat.h subject.h
|
||||
functions.o: template.h tinymce.h uname.h upload.h uptime.h who.h vim.h
|
||||
functions.o: ../core/htmlfilter.h ../core/log.h ../core/misc.h
|
||||
functions.o: ../core/plugin.h ../core/pluginmsg.h ../core/system.h
|
||||
functions.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
functions.o: ../functions/functions.h ../templates/templates.h
|
||||
functions.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
|
||||
functions.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
functions.o: ../templates/indexpatterns.h ../core/sessionmanager.h
|
||||
functions.o: ../core/crypt.h run.h ../core/users.h ../core/groups.h
|
||||
functions.o: ../core/group.h ../core/rebus.h ../core/loadavg.h
|
||||
functions.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
functions.o: functionparser.h ../core/cur.h ../core/session.h
|
||||
functions.o: ../core/plugindata.h adduser.h cat.h chmod.h privchanger.h
|
||||
functions.o: chown.h ckeditor.h cp.h default.h download.h emacs.h last.h
|
||||
functions.o: login.h logout.h ln.h ls.h mkdir.h mv.h node.h priv.h reload.h
|
||||
functions.o: rm.h specialdefault.h stat.h subject.h template.h tinymce.h
|
||||
functions.o: uname.h upload.h uptime.h who.h vim.h ../core/htmlfilter.h
|
||||
functions.o: ../core/log.h ../core/misc.h ../core/plugin.h
|
||||
functions.o: ../core/pluginmsg.h ../core/system.h ../core/sessionmanager.h
|
||||
functions.o: ../core/sessioncontainer.h ../functions/functions.h
|
||||
functions.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
functions.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
functions.o: ../core/log.h ../templates/indexpatterns.h
|
||||
functions.o: ../core/sessionmanager.h
|
||||
last.o: last.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
last.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
last.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -366,8 +372,9 @@ last.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
last.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
||||
last.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
last.o: ../core/cur.h ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
last.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
last.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
last.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
last.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
last.o: ../core/synchro.h
|
||||
ln.o: ln.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
ln.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
ln.o: ../core/item.h ../core/error.h ../core/log.h ../core/textstream.h
|
||||
@@ -391,8 +398,8 @@ ln.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
ln.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
ln.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
ln.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h ../core/mount.h
|
||||
ln.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
ln.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
ln.o: ../core/mountparser.h ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
ln.o: ../core/group.h ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
ln.o: ../core/synchro.h ../core/misc.h ../functions/functions.h
|
||||
login.o: login.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
login.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
@@ -418,8 +425,9 @@ login.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
login.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
||||
login.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
login.o: ../core/cur.h ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
login.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
login.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
login.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
login.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
login.o: ../core/synchro.h
|
||||
logout.o: logout.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
logout.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
logout.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -444,9 +452,9 @@ logout.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
logout.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
logout.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
logout.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h
|
||||
logout.o: ../core/mount.h ../core/mountparser.h ../core/users.h
|
||||
logout.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
logout.o: ../core/basethread.h ../core/synchro.h
|
||||
logout.o: ../core/mount.h ../core/mountparser.h ../core/crypt.h
|
||||
logout.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
logout.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
ls.o: ls.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
ls.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
ls.o: ../core/item.h ../core/error.h ../core/log.h ../core/textstream.h
|
||||
@@ -470,8 +478,8 @@ ls.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
ls.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
ls.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
ls.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h ../core/mount.h
|
||||
ls.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
ls.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
ls.o: ../core/mountparser.h ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
ls.o: ../core/group.h ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
ls.o: ../core/synchro.h
|
||||
mkdir.o: mkdir.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
mkdir.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
@@ -497,8 +505,9 @@ mkdir.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
mkdir.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
||||
mkdir.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
mkdir.o: ../core/cur.h ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
mkdir.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
mkdir.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
mkdir.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
mkdir.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
mkdir.o: ../core/synchro.h
|
||||
mv.o: mv.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
mv.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
mv.o: ../core/item.h ../core/error.h ../core/log.h ../core/textstream.h
|
||||
@@ -522,8 +531,8 @@ mv.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
mv.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
mv.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
mv.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h ../core/mount.h
|
||||
mv.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
mv.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
mv.o: ../core/mountparser.h ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
mv.o: ../core/group.h ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
mv.o: ../core/synchro.h
|
||||
node.o: node.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
node.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
@@ -549,8 +558,9 @@ node.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
node.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
||||
node.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
node.o: ../core/cur.h ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
node.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
node.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
node.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
node.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
node.o: ../core/synchro.h
|
||||
priv.o: priv.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
priv.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
priv.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -575,8 +585,9 @@ priv.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
priv.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
||||
priv.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
priv.o: ../core/cur.h ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
priv.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
priv.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
priv.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
priv.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
priv.o: ../core/synchro.h
|
||||
privchanger.o: privchanger.h ../core/request.h ../core/requesttypes.h
|
||||
privchanger.o: ../core/item.h ../core/error.h ../core/config.h
|
||||
privchanger.o: ../core/confparser.h ../core/htmlfilter.h ../core/textstream.h
|
||||
@@ -605,8 +616,9 @@ privchanger.o: ../core/basethread.h ../core/synchro.h
|
||||
privchanger.o: ../notify/templatesnotify.h ../core/users.h
|
||||
privchanger.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/cur.h
|
||||
privchanger.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
privchanger.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
privchanger.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
privchanger.o: ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
privchanger.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
privchanger.o: ../core/basethread.h
|
||||
reload.o: reload.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
reload.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
reload.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -631,12 +643,12 @@ reload.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
reload.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
reload.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
reload.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h
|
||||
reload.o: ../core/mount.h ../core/mountparser.h ../core/users.h
|
||||
reload.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
reload.o: ../core/basethread.h ../core/synchro.h ../templates/templates.h
|
||||
reload.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h
|
||||
reload.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
reload.o: ../templates/indexpatterns.h ../core/sessionmanager.h
|
||||
reload.o: ../core/mount.h ../core/mountparser.h ../core/crypt.h
|
||||
reload.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
reload.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
reload.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
reload.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h
|
||||
reload.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h
|
||||
reload.o: ../core/sessioncontainer.h ../core/system.h
|
||||
rm.o: rm.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
rm.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
@@ -661,8 +673,8 @@ rm.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
rm.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
rm.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
rm.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h ../core/mount.h
|
||||
rm.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
rm.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
rm.o: ../core/mountparser.h ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
rm.o: ../core/group.h ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
rm.o: ../core/synchro.h ../core/plugin.h ../core/pluginmsg.h ../core/system.h
|
||||
rm.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
rm.o: ../functions/functions.h ../templates/templates.h
|
||||
@@ -692,8 +704,8 @@ run.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
run.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
run.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
run.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h ../core/mount.h
|
||||
run.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
run.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
run.o: ../core/mountparser.h ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
run.o: ../core/group.h ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
run.o: ../core/synchro.h
|
||||
specialdefault.o: specialdefault.h functionbase.h ../core/item.h ../db/db.h
|
||||
specialdefault.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
@@ -724,9 +736,9 @@ specialdefault.o: ../core/basethread.h ../core/synchro.h
|
||||
specialdefault.o: ../notify/templatesnotify.h ../core/users.h
|
||||
specialdefault.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/cur.h
|
||||
specialdefault.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
specialdefault.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
specialdefault.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
specialdefault.o: ../core/synchro.h
|
||||
specialdefault.o: ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
specialdefault.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
specialdefault.o: ../core/basethread.h ../core/synchro.h
|
||||
stat.o: stat.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
stat.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
stat.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -751,8 +763,9 @@ stat.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
stat.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
||||
stat.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
stat.o: ../core/cur.h ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
stat.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
stat.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
stat.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
stat.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
stat.o: ../core/synchro.h
|
||||
subject.o: subject.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
subject.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
subject.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -777,9 +790,9 @@ subject.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
subject.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
subject.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
subject.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h
|
||||
subject.o: ../core/mount.h ../core/mountparser.h ../core/users.h
|
||||
subject.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
subject.o: ../core/basethread.h ../core/synchro.h
|
||||
subject.o: ../core/mount.h ../core/mountparser.h ../core/crypt.h
|
||||
subject.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
subject.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
template.o: template.h functionbase.h ../core/item.h ../db/db.h
|
||||
template.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
template.o: ../core/textstream.h ../core/misc.h ../core/item.h
|
||||
@@ -806,10 +819,10 @@ template.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
template.o: ../core/basethread.h ../core/synchro.h
|
||||
template.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
template.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h
|
||||
template.o: ../core/mount.h ../core/mountparser.h ../core/users.h
|
||||
template.o: ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
template.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
template.o: ../core/misc.h
|
||||
template.o: ../core/mount.h ../core/mountparser.h ../core/crypt.h
|
||||
template.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
template.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
template.o: ../core/synchro.h ../core/misc.h
|
||||
tinymce.o: tinymce.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
tinymce.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
tinymce.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -834,9 +847,9 @@ tinymce.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
tinymce.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
tinymce.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
tinymce.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h
|
||||
tinymce.o: ../core/mount.h ../core/mountparser.h ../core/users.h
|
||||
tinymce.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
tinymce.o: ../core/basethread.h ../core/synchro.h
|
||||
tinymce.o: ../core/mount.h ../core/mountparser.h ../core/crypt.h
|
||||
tinymce.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
tinymce.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
uname.o: uname.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
uname.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
uname.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -861,8 +874,9 @@ uname.o: ../templates/htmltextstream.h ../notify/notifythread.h
|
||||
uname.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
||||
uname.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
uname.o: ../core/cur.h ../core/mounts.h ../core/mount.h ../core/mountparser.h
|
||||
uname.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
uname.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
uname.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
uname.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
uname.o: ../core/synchro.h
|
||||
upload.o: upload.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
upload.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
upload.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -887,10 +901,10 @@ upload.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
upload.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
upload.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
upload.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h
|
||||
upload.o: ../core/mount.h ../core/mountparser.h ../core/users.h
|
||||
upload.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
upload.o: ../core/basethread.h ../core/synchro.h ../core/misc.h
|
||||
upload.o: ../functions/functions.h
|
||||
upload.o: ../core/mount.h ../core/mountparser.h ../core/crypt.h
|
||||
upload.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
upload.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
upload.o: ../core/misc.h ../functions/functions.h
|
||||
uptime.o: uptime.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
uptime.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
uptime.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -915,9 +929,9 @@ uptime.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
uptime.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
uptime.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
uptime.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h
|
||||
uptime.o: ../core/mount.h ../core/mountparser.h ../core/users.h
|
||||
uptime.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
uptime.o: ../core/basethread.h ../core/synchro.h
|
||||
uptime.o: ../core/mount.h ../core/mountparser.h ../core/crypt.h
|
||||
uptime.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
uptime.o: ../core/thumb.h ../core/basethread.h ../core/synchro.h
|
||||
vim.o: vim.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
vim.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
vim.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h
|
||||
@@ -941,8 +955,8 @@ vim.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
vim.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
vim.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
vim.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h ../core/mount.h
|
||||
vim.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
vim.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
vim.o: ../core/mountparser.h ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
vim.o: ../core/group.h ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
vim.o: ../core/synchro.h
|
||||
who.o: who.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
who.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
@@ -967,6 +981,6 @@ who.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h
|
||||
who.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
||||
who.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
who.o: ../core/lastcontainer.h ../core/cur.h ../core/mounts.h ../core/mount.h
|
||||
who.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
who.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
who.o: ../core/mountparser.h ../core/crypt.h ../core/users.h ../core/groups.h
|
||||
who.o: ../core/group.h ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
who.o: ../core/synchro.h
|
||||
|
||||
+37
-4
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -35,7 +35,7 @@ bool AddUser::CheckAddUserVars(const std::wstring & login, const std::wstring &
|
||||
return false;
|
||||
}
|
||||
|
||||
if( pass.size() < config->password_min_size )
|
||||
if( pass.size() < config->pass_min_size )
|
||||
{
|
||||
cur->request->status = WINIX_ERR_PASSWORD_TOO_SHORT;
|
||||
return false;
|
||||
@@ -61,7 +61,7 @@ User user;
|
||||
|
||||
const std::wstring & login = cur->request->PostVar(L"login");
|
||||
const std::wstring & pass = cur->request->PostVar(L"password");
|
||||
const std::wstring & conf_pass = cur->request->PostVar(L"confirmpassword");
|
||||
const std::wstring & conf_pass = cur->request->PostVar(L"passwordconfirm");
|
||||
|
||||
if( !CheckAddUserVars(login, pass, conf_pass) )
|
||||
return;
|
||||
@@ -69,7 +69,10 @@ User user;
|
||||
user.name = login;
|
||||
user.email = cur->request->PostVar(L"email");
|
||||
|
||||
cur->request->status = db->AddUser(user, pass);
|
||||
up.pass = pass;
|
||||
system->crypt.PassHashCrypt(up);
|
||||
|
||||
cur->request->status = db->AddUser(user, up.pass, up.pass_encrypted, up.pass_type, up.pass_hash_salted);
|
||||
|
||||
if( cur->request->status == WINIX_ERR_OK )
|
||||
{
|
||||
@@ -91,6 +94,36 @@ User user;
|
||||
}
|
||||
|
||||
|
||||
void AddUser::MakeGet()
|
||||
{
|
||||
Run s;
|
||||
std::string out;
|
||||
|
||||
/*
|
||||
s.Env("PATH=/home/tomek/mybin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin");
|
||||
s.Env("PWD=/home/tomek");
|
||||
s.Env("SHELL=/bin/tcsh");
|
||||
s.Env("USER=tomek");
|
||||
s.Env("GROUP=wheel");
|
||||
s.Env("HOME=/home/tomek");
|
||||
*/
|
||||
|
||||
s.Par("dgst");
|
||||
s.Par("-sha512");
|
||||
s.Cmd("/usr/bin/openssl");
|
||||
|
||||
if( s.Go("swinka", out) == 0 )
|
||||
log << log1 << "odpowiedz: " << out << logend;
|
||||
|
||||
if( s.Go("cosik", out) == 0 )
|
||||
log << log1 << "odpowiedz: " << out << logend;
|
||||
|
||||
if( s.Go("ktosik", out) == 0 )
|
||||
log << log1 << "odpowiedz: " << out << logend;
|
||||
|
||||
if( s.Go("", out) == 0 )
|
||||
log << log1 << "odpowiedz: " << out << logend;
|
||||
}
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
+4
-3
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -11,7 +11,7 @@
|
||||
#define headerfile_winix_functions_adduser
|
||||
|
||||
#include "functionbase.h"
|
||||
|
||||
#include "core/user.h"
|
||||
|
||||
|
||||
namespace Fun
|
||||
@@ -24,11 +24,12 @@ public:
|
||||
|
||||
AddUser();
|
||||
void MakePost();
|
||||
void MakeGet();
|
||||
|
||||
private:
|
||||
|
||||
bool CheckAddUserVars(const std::wstring & login, const std::wstring & pass, const std::wstring & conf_pass);
|
||||
|
||||
UserPass up;
|
||||
};
|
||||
|
||||
|
||||
|
||||
+83
-4
@@ -2,12 +2,14 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "login.h"
|
||||
#include "utf8.h"
|
||||
|
||||
|
||||
|
||||
namespace Fun
|
||||
@@ -19,6 +21,79 @@ Login::Login()
|
||||
}
|
||||
|
||||
|
||||
void Login::ClearTmpStruct()
|
||||
{
|
||||
system->crypt.ClearString(pass_decrypted);
|
||||
system->crypt.ClearString(pass_hashed);
|
||||
system->crypt.ClearString(up.pass);
|
||||
system->crypt.ClearString(up.pass_encrypted);
|
||||
system->crypt.ClearString(up2.pass);
|
||||
system->crypt.ClearString(up2.pass_encrypted);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Login::CheckPasswords(const std::wstring & password)
|
||||
{
|
||||
if( !up.pass_encrypted.empty() )
|
||||
{
|
||||
if( system->crypt.RSA(false, config->pass_rsa_private_key, up.pass_encrypted, pass_decrypted) )
|
||||
{
|
||||
Ezc::UTF8ToWide(pass_decrypted, up.pass);
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Login: I cannot decrypt a stored password, login failure" << logend;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
pass_hashed = password;
|
||||
up2.pass_type = up.pass_type;
|
||||
up2.pass = password;
|
||||
|
||||
if( up.pass_hash_salted )
|
||||
salt = config->pass_hash_salt;
|
||||
else
|
||||
salt.clear();
|
||||
|
||||
if( !system->crypt.PassHash(salt, up2) )
|
||||
{
|
||||
log << log1 << "Login: I cannot hash a password, login failure" << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
return up.pass == up2.pass;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
this method is checking whether there is a person with that login and password
|
||||
in the database
|
||||
|
||||
return true if it has found one and sets it user_id
|
||||
*/
|
||||
bool Login::CheckUserPass(const std::wstring & login, const std::wstring & password, long & user_id)
|
||||
{
|
||||
bool result;
|
||||
|
||||
if( db->GetUserPass(login, user_id, up) )
|
||||
{
|
||||
result = CheckPasswords(password);
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Login: there is no a user: " << login << " in the database (or an error)" << logend;
|
||||
result = false;
|
||||
}
|
||||
|
||||
ClearTmpStruct();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Login::MakePost()
|
||||
{
|
||||
@@ -33,10 +108,14 @@ void Login::MakePost()
|
||||
const std::wstring & remem = cur->request->PostVar(L"rememberme");
|
||||
long user_id;
|
||||
|
||||
if( db->CheckUser(login, pass, user_id) )
|
||||
if( CheckUserPass(login, pass, user_id) )
|
||||
{
|
||||
system->users.LoginUser(user_id, !remem.empty());
|
||||
|
||||
// !! moze zglosic komunikat o nie poprawnym logowaniu
|
||||
}
|
||||
else
|
||||
{
|
||||
// !! moze zglosic komunikat o nie poprawnym logowaniu
|
||||
}
|
||||
|
||||
system->RedirectToLastItem();
|
||||
}
|
||||
|
||||
+10
-1
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -11,6 +11,7 @@
|
||||
#define headerfile_winix_functions_login
|
||||
|
||||
#include "functionbase.h"
|
||||
#include "core/user.h"
|
||||
|
||||
|
||||
|
||||
@@ -24,10 +25,18 @@ public:
|
||||
|
||||
Login();
|
||||
void MakePost();
|
||||
bool CheckUserPass(const std::wstring & login, const std::wstring & password, long & user_id);
|
||||
|
||||
private:
|
||||
|
||||
void LoginUser(long user_id, bool remember_me);
|
||||
void ClearTmpStruct();
|
||||
bool CheckPasswords(const std::wstring & password);
|
||||
|
||||
UserPass up, up2;
|
||||
std::string pass_decrypted;
|
||||
std::wstring pass_hashed;
|
||||
std::wstring salt;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user