History log of /dovecot/src/auth/password-scheme-otp.c
Revision Date Author Comments Expand
e34d170f8f0e084bd94bfbc1a7085ece67e508df 25-Jun-2012 Timo Sirainen <tss@iki.fi>

Make sure we check all the functions' return values. Minor API changes to simplify this. Checked using a patched clang that adds attribute(warn_unused_result) to all functions. This commit fixes several error handling mistakes.

/dovecot/src/anvil/main.c auth-request.c mech-digest-md5.c mech-scram-sha1.c passdb-blocking.c password-scheme-otp.c userdb-blocking.c userdb-sql.c /dovecot/src/config/doveconf.c /dovecot/src/config/main.c /dovecot/src/config/old-set-parser.c /dovecot/src/dict/dict-commands.c /dovecot/src/dict/main.c /dovecot/src/director/director-connection.c /dovecot/src/director/director-host.c /dovecot/src/director/director.c /dovecot/src/director/doveadm-connection.c /dovecot/src/director/mail-host.c /dovecot/src/director/main.c /dovecot/src/director/test-user-directory.c /dovecot/src/doveadm/doveadm-dump-dbox.c /dovecot/src/doveadm/doveadm-mail-server.c /dovecot/src/doveadm/doveadm-mailbox-list-iter.c /dovecot/src/doveadm/doveadm-mount.c /dovecot/src/doveadm/doveadm-penalty.c /dovecot/src/doveadm/doveadm-stats.c /dovecot/src/doveadm/dsync/doveadm-dsync.c /dovecot/src/doveadm/dsync/dsync-brain-mailbox-tree.c /dovecot/src/doveadm/dsync/dsync-brain-mailbox.c /dovecot/src/doveadm/dsync/dsync-brain-mails.c /dovecot/src/doveadm/dsync/dsync-mailbox-import.c /dovecot/src/doveadm/dsync/dsync-mailbox-tree.c /dovecot/src/doveadm/dsync/dsync-slave.c /dovecot/src/doveadm/dsync/dsync-slave.h /dovecot/src/doveadm/server-connection.c /dovecot/src/doveadm/server-connection.h /dovecot/src/imap-login/client.c /dovecot/src/imap/cmd-fetch.c /dovecot/src/imap/cmd-idle.c /dovecot/src/imap/cmd-list.c /dovecot/src/imap/imap-client.c /dovecot/src/imap/imap-client.h /dovecot/src/imap/imap-fetch-body.c /dovecot/src/imap/imap-sync.c /dovecot/src/imap/main.c /dovecot/src/indexer/master-connection.c /dovecot/src/lib-auth/auth-client.c /dovecot/src/lib-imap/imap-parser.c /dovecot/src/lib-imap/imap-quote.c /dovecot/src/lib-index/mail-cache-compress.c /dovecot/src/lib-index/mail-cache-transaction.c /dovecot/src/lib-index/mail-cache.c /dovecot/src/lib-index/mail-index-fsck.c /dovecot/src/lib-index/mail-index-map-hdr.c /dovecot/src/lib-index/mail-index-modseq.c /dovecot/src/lib-index/mail-index-private.h /dovecot/src/lib-index/mail-index-strmap.c /dovecot/src/lib-index/mail-index-sync-update.c /dovecot/src/lib-index/mail-index-transaction-private.h /dovecot/src/lib-index/mail-index-transaction-sort-appends.c /dovecot/src/lib-index/mail-index-transaction-update.c /dovecot/src/lib-index/mail-index-view-sync.c /dovecot/src/lib-index/mail-index-write.c /dovecot/src/lib-index/mail-index.c /dovecot/src/lib-index/mail-transaction-log-file.c /dovecot/src/lib-index/test-mail-index-transaction-update.c /dovecot/src/lib-index/test-mail-transaction-log-append.c /dovecot/src/lib-mail/message-header-decode.c /dovecot/src/lib-mail/message-part-serialize.c /dovecot/src/lib-mail/rfc822-parser.c /dovecot/src/lib-mail/test-istream-dot.c /dovecot/src/lib-ntlm/ntlm-des.c /dovecot/src/lib-ntlm/ntlm-des.h /dovecot/src/lib-ntlm/ntlm-encrypt.c /dovecot/src/lib-ntlm/ntlm-encrypt.h /dovecot/src/lib-otp/otp-hash.c /dovecot/src/lib-otp/otp-hash.h /dovecot/src/lib-storage/index/dbox-common/dbox-file-fix.c /dovecot/src/lib-storage/index/dbox-common/dbox-file.c /dovecot/src/lib-storage/index/dbox-common/dbox-sync-rebuild.c /dovecot/src/lib-storage/index/dbox-multi/mdbox-purge.c /dovecot/src/lib-storage/index/dbox-single/sdbox-copy.c /dovecot/src/lib-storage/index/imapc/imapc-mail.c /dovecot/src/lib-storage/index/imapc/imapc-storage.c /dovecot/src/lib-storage/index/index-mail.c /dovecot/src/lib-storage/index/index-search.c /dovecot/src/lib-storage/index/index-sort-string.c /dovecot/src/lib-storage/index/index-sort.c /dovecot/src/lib-storage/index/index-status.c /dovecot/src/lib-storage/index/index-storage.h /dovecot/src/lib-storage/index/index-sync-changes.c /dovecot/src/lib-storage/index/index-sync.c /dovecot/src/lib-storage/index/index-thread.c /dovecot/src/lib-storage/index/maildir/maildir-uidlist.c /dovecot/src/lib-storage/index/mbox/istream-raw-mbox.c /dovecot/src/lib-storage/index/mbox/mbox-mail.c /dovecot/src/lib-storage/index/mbox/mbox-save.c /dovecot/src/lib-storage/index/mbox/mbox-storage.c /dovecot/src/lib-storage/index/mbox/mbox-storage.h /dovecot/src/lib-storage/index/mbox/mbox-sync.c /dovecot/src/lib-storage/index/pop3c/pop3c-client.c /dovecot/src/lib-storage/index/raw/raw-mail.c /dovecot/src/lib-storage/mail-search-build.c /dovecot/src/lib-storage/mail-storage-private.h /dovecot/src/lib-storage/mail.c /dovecot/src/lib-storage/mailbox-get.c /dovecot/src/lib-storage/mailbox-uidvalidity.c /dovecot/src/lib/data-stack.c /dovecot/src/lib/hash.c /dovecot/src/lib/hostpid.c /dovecot/src/lib/iostream-rawlog.c /dovecot/src/lib/md4.c /dovecot/src/lib/md5.c /dovecot/src/lib/mountpoint.c /dovecot/src/lib/nfs-workarounds.c /dovecot/src/lib/nfs-workarounds.h /dovecot/src/lib/seq-range-array.c /dovecot/src/lib/seq-range-array.h /dovecot/src/lib/test-base64.c /dovecot/src/lib/test-network.c /dovecot/src/lib/test-ostream-file.c /dovecot/src/lib/test-seq-range-array.c /dovecot/src/log/log-connection.c /dovecot/src/log/log-connection.h /dovecot/src/login-common/client-common-auth.c /dovecot/src/login-common/login-proxy-state.c /dovecot/src/login-common/login-proxy.c /dovecot/src/login-common/ssl-proxy-openssl.c /dovecot/src/master/main.c /dovecot/src/master/service-anvil.c /dovecot/src/master/service-process.c /dovecot/src/master/service-process.h /dovecot/src/plugins/autocreate/autocreate-plugin.c /dovecot/src/plugins/expire/doveadm-expire.c /dovecot/src/plugins/expire/expire-plugin.c /dovecot/src/plugins/fts-lucene/fts-backend-lucene.c /dovecot/src/plugins/fts-squat/squat-trie.c /dovecot/src/plugins/fts-squat/squat-uidlist.c /dovecot/src/plugins/fts/fts-storage.c /dovecot/src/plugins/imap-acl/imap-acl-plugin.c /dovecot/src/plugins/imap-quota/imap-quota-plugin.c /dovecot/src/plugins/imap-zlib/imap-zlib-plugin.c /dovecot/src/plugins/quota/quota-maildir.c /dovecot/src/plugins/quota/quota.c /dovecot/src/plugins/stats/stats-connection.c /dovecot/src/plugins/virtual/virtual-mail.c /dovecot/src/plugins/virtual/virtual-sync.c /dovecot/src/plugins/zlib/doveadm-zlib.c /dovecot/src/plugins/zlib/ostream-zlib.c /dovecot/src/pop3/main.c /dovecot/src/pop3/pop3-client.c /dovecot/src/pop3/pop3-client.h /dovecot/src/pop3/pop3-commands.c /dovecot/src/replication/aggregator/notify-connection.c /dovecot/src/replication/replicator/notify-connection.c /dovecot/src/stats/main.c /dovecot/src/util/rawlog.c
a10ed8c47534b4c6b6bf2711ccfe577e720a47b4 23-Jun-2012 Timo Sirainen <tss@iki.fi>

Marked functions parameters that are allowed to be NULL. Some APIs were also changed. The non-obvious APIs where NULL parameter was changed to "" are master_service_init() and auth_master_user_list_init(). These checks can currently be enabled only on a patched clang: http://llvm.org/bugs/show_bug.cgi?id=6786

/dovecot/src/anvil/main.c auth-master-connection.c auth-master-connection.h auth-request-handler.c auth-request.c auth-request.h auth-settings.h auth-stream.h auth-worker-server.c auth.c auth.h db-checkpassword.h db-ldap.c db-ldap.h db-passwd-file.c main.c mech-anonymous.c mech-apop.c mech-cram-md5.c mech-ntlm.c mech-otp-skey-common.c mech-plain-common.c mech-rpa.c mech-winbind.c mech.c password-scheme-otp.c password-scheme.h userdb-passwd.c userdb-static.c userdb.h /dovecot/src/config/config-parser-private.h /dovecot/src/config/config-request.h /dovecot/src/config/doveconf.c /dovecot/src/config/main.c /dovecot/src/dict/main.c /dovecot/src/director/director-connection.c /dovecot/src/director/director-test.c /dovecot/src/director/director.h /dovecot/src/dns/dns-client.c /dovecot/src/doveadm/doveadm-director.c /dovecot/src/doveadm/doveadm-log.c /dovecot/src/doveadm/doveadm-mail-fetch.c /dovecot/src/doveadm/doveadm-mail-iter.h /dovecot/src/doveadm/doveadm-mail-mailbox-status.c /dovecot/src/doveadm/dsync/doveadm-dsync.c /dovecot/src/doveadm/dsync/dsync-brain.c /dovecot/src/doveadm/dsync/dsync-mailbox-import.c /dovecot/src/doveadm/dsync/dsync-slave-io.c /dovecot/src/doveadm/main.c /dovecot/src/imap-login/client.c /dovecot/src/imap-login/client.h /dovecot/src/imap/cmd-append.c /dovecot/src/imap/cmd-expunge.c /dovecot/src/imap/imap-client.h /dovecot/src/imap/imap-commands-util.h /dovecot/src/imap/imap-expunge.h /dovecot/src/imap/imap-fetch-body.c /dovecot/src/imap/imap-fetch.h /dovecot/src/imap/imap-search.h /dovecot/src/imap/imap-sync.c /dovecot/src/indexer/indexer.c /dovecot/src/indexer/master-connection.c /dovecot/src/ipc/client.c /dovecot/src/ipc/main.c /dovecot/src/lib-auth/auth-client-request.c /dovecot/src/lib-auth/auth-client.h /dovecot/src/lib-auth/auth-master.c /dovecot/src/lib-auth/auth-master.h /dovecot/src/lib-dict/dict.h /dovecot/src/lib-dns/dns-lookup.h /dovecot/src/lib-imap-client/imapc-connection.h /dovecot/src/lib-imap-storage/imap-msgpart.c /dovecot/src/lib-imap/imap-base-subject.c /dovecot/src/lib-imap/imap-parser.c /dovecot/src/lib-imap/imap-parser.h /dovecot/src/lib-imap/imap-url.c /dovecot/src/lib-imap/imap-util.h /dovecot/src/lib-index/mail-cache-lookup.c /dovecot/src/lib-index/mail-cache-transaction.c /dovecot/src/lib-index/mail-index-alloc-cache.c /dovecot/src/lib-index/mail-index-alloc-cache.h /dovecot/src/lib-index/mail-index-map-hdr.c /dovecot/src/lib-index/mail-index-map.c /dovecot/src/lib-index/mail-index-util.h /dovecot/src/lib-index/mail-index-view.c /dovecot/src/lib-index/mail-index.c /dovecot/src/lib-index/mail-index.h /dovecot/src/lib-lda/mail-deliver.h /dovecot/src/lib-lda/smtp-client.h /dovecot/src/lib-mail/istream-binary-converter.c /dovecot/src/lib-mail/istream-dot.c /dovecot/src/lib-mail/istream-header-filter.h /dovecot/src/lib-mail/message-header-parser.h /dovecot/src/lib-mail/message-parser.h /dovecot/src/lib-mail/message-part-serialize.c /dovecot/src/lib-mail/message-search.h /dovecot/src/lib-mail/message-size.c /dovecot/src/lib-mail/message-size.h /dovecot/src/lib-mail/rfc822-parser.h /dovecot/src/lib-mail/test-istream-header-filter.c /dovecot/src/lib-master/anvil-client.h /dovecot/src/lib-master/ipc-client.h /dovecot/src/lib-master/ipc-server.c /dovecot/src/lib-master/master-service-settings-cache.h /dovecot/src/lib-master/master-service-settings.h /dovecot/src/lib-master/master-service.c /dovecot/src/lib-master/master-service.h /dovecot/src/lib-master/mountpoint-list.c /dovecot/src/lib-ntlm/ntlm-encrypt.c /dovecot/src/lib-ntlm/ntlm-encrypt.h /dovecot/src/lib-otp/otp-parse.c /dovecot/src/lib-settings/settings-parser.c /dovecot/src/lib-settings/settings.h /dovecot/src/lib-sql/driver-mysql.c /dovecot/src/lib-sql/driver-pgsql.c /dovecot/src/lib-sql/driver-sqlpool.c /dovecot/src/lib-sql/sql-api.c /dovecot/src/lib-storage/index/dbox-common/dbox-file-fix.c /dovecot/src/lib-storage/index/dbox-common/dbox-save.h /dovecot/src/lib-storage/index/dbox-common/dbox-storage.c /dovecot/src/lib-storage/index/dbox-common/dbox-sync-rebuild.c /dovecot/src/lib-storage/index/dbox-multi/mdbox-map.c /dovecot/src/lib-storage/index/dbox-multi/mdbox-storage.c /dovecot/src/lib-storage/index/dbox-multi/mdbox-storage.h /dovecot/src/lib-storage/index/dbox-multi/mdbox-sync.c /dovecot/src/lib-storage/index/dbox-single/sdbox-storage.c /dovecot/src/lib-storage/index/imapc/imapc-mail.c /dovecot/src/lib-storage/index/index-mail-headers.c /dovecot/src/lib-storage/index/index-mail.c /dovecot/src/lib-storage/index/index-mail.h /dovecot/src/lib-storage/index/index-search.c /dovecot/src/lib-storage/index/index-sort.c /dovecot/src/lib-storage/index/index-storage.h /dovecot/src/lib-storage/index/index-sync-changes.h /dovecot/src/lib-storage/index/maildir/maildir-filename-flags.c /dovecot/src/lib-storage/index/maildir/maildir-filename-flags.h /dovecot/src/lib-storage/index/maildir/maildir-mail.c /dovecot/src/lib-storage/index/maildir/maildir-save.c /dovecot/src/lib-storage/index/maildir/maildir-storage.c /dovecot/src/lib-storage/index/maildir/maildir-storage.h /dovecot/src/lib-storage/index/maildir/maildir-sync-index.c /dovecot/src/lib-storage/index/maildir/maildir-sync.c /dovecot/src/lib-storage/index/maildir/maildir-sync.h /dovecot/src/lib-storage/index/maildir/maildir-uidlist.c /dovecot/src/lib-storage/index/maildir/maildir-uidlist.h /dovecot/src/lib-storage/index/maildir/maildir-util.c /dovecot/src/lib-storage/index/mbox/mbox-file.c /dovecot/src/lib-storage/index/mbox/mbox-lock.c /dovecot/src/lib-storage/index/mbox/mbox-mail.c /dovecot/src/lib-storage/index/mbox/mbox-storage.c /dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c /dovecot/src/lib-storage/index/mbox/mbox-sync.c /dovecot/src/lib-storage/index/raw/raw-storage.c /dovecot/src/lib-storage/index/shared/shared-storage.c /dovecot/src/lib-storage/list/mailbox-list-delete.c /dovecot/src/lib-storage/list/mailbox-list-fs-iter.c /dovecot/src/lib-storage/list/mailbox-list-fs.c /dovecot/src/lib-storage/list/mailbox-list-index-status.c /dovecot/src/lib-storage/list/mailbox-list-index.c /dovecot/src/lib-storage/list/mailbox-list-maildir.c /dovecot/src/lib-storage/mail-namespace.h /dovecot/src/lib-storage/mail-search.h /dovecot/src/lib-storage/mail-storage-service.c /dovecot/src/lib-storage/mail-storage-service.h /dovecot/src/lib-storage/mail-storage.c /dovecot/src/lib-storage/mail-storage.h /dovecot/src/lib-storage/mail-thread.h /dovecot/src/lib-storage/mail.c /dovecot/src/lib-storage/mailbox-get.c /dovecot/src/lib-storage/mailbox-list-private.h /dovecot/src/lib-storage/mailbox-list.c /dovecot/src/lib-storage/mailbox-list.h /dovecot/src/lib-storage/mailbox-tree.c /dovecot/src/lib-storage/mailbox-tree.h /dovecot/src/lib-test/test-common.h /dovecot/src/lib/base64.h /dovecot/src/lib/buffer.h /dovecot/src/lib/child-wait.h /dovecot/src/lib/eacces-error.h /dovecot/src/lib/failures.c /dovecot/src/lib/file-dotlock.c /dovecot/src/lib/hash.c /dovecot/src/lib/hash.h /dovecot/src/lib/hash2.h /dovecot/src/lib/ioloop-notify-fd.h /dovecot/src/lib/ioloop.c /dovecot/src/lib/ioloop.h /dovecot/src/lib/iso8601-date.c /dovecot/src/lib/istream-base64-encoder.c /dovecot/src/lib/istream-chain.c /dovecot/src/lib/istream-chain.h /dovecot/src/lib/istream-crlf.c /dovecot/src/lib/istream-private.h /dovecot/src/lib/istream-seekable.h /dovecot/src/lib/istream.c /dovecot/src/lib/istream.h /dovecot/src/lib/lib-signals.c /dovecot/src/lib/lib-signals.h /dovecot/src/lib/macros.h /dovecot/src/lib/mkdir-parents.c /dovecot/src/lib/module-dir.h /dovecot/src/lib/network.c /dovecot/src/lib/network.h /dovecot/src/lib/ostream-private.h /dovecot/src/lib/ostream.c /dovecot/src/lib/ostream.h /dovecot/src/lib/restrict-access.h /dovecot/src/lib/safe-mkstemp.c /dovecot/src/lib/strfuncs.c /dovecot/src/lib/strfuncs.h /dovecot/src/lib/test-iso8601-date.c /dovecot/src/lib/uri-util.c /dovecot/src/lib/uri-util.h /dovecot/src/lib/var-expand.h /dovecot/src/lmtp/client.h /dovecot/src/lmtp/lmtp-proxy.h /dovecot/src/log/main.c /dovecot/src/login-common/client-common-auth.c /dovecot/src/login-common/login-proxy.c /dovecot/src/login-common/login-settings.h /dovecot/src/login-common/sasl-server.c /dovecot/src/login-common/ssl-proxy-openssl.c /dovecot/src/master/common.h /dovecot/src/plugins/acl/acl-backend-vfile-acllist.c /dovecot/src/plugins/acl/acl-plugin.h /dovecot/src/plugins/fts-lucene/fts-backend-lucene.c /dovecot/src/plugins/fts-lucene/lucene-wrapper.h /dovecot/src/plugins/fts-solr/solr-connection.c /dovecot/src/plugins/fts-squat/squat-trie.h /dovecot/src/plugins/fts/fts-storage.c /dovecot/src/plugins/quota/quota-dirsize.c /dovecot/src/plugins/quota/quota-fs.c /dovecot/src/plugins/quota/quota-maildir.c /dovecot/src/plugins/quota/quota.c /dovecot/src/pop3/pop3-client.h /dovecot/src/replication/aggregator/aggregator.c /dovecot/src/replication/replicator/replicator.c /dovecot/src/ssl-params/main.c /dovecot/src/stats/mail-domain.h /dovecot/src/stats/mail-ip.h /dovecot/src/stats/mail-session.h /dovecot/src/stats/mail-user.h /dovecot/src/stats/main.c
06d948c4adc2bfd2934f74c8046bcc1d567426d8 23-May-2011 Timo Sirainen <tss@iki.fi>

auth: Don't log warnings/errors when guessing a password's scheme.

042a07daa4a5614159532a2a3878e76e3f176965 16-Sep-2007 Timo Sirainen <tss@iki.fi>

Renamed strocpy() to i_strocpy(). --HG-- branch : HEAD

e9e2d23e1ea5a149a7d8828d2a45b9f2313c3785 12-Nov-2006 Timo Sirainen <tss@iki.fi>

Added OTP and S/KEY authentication mechanisms. Patch by Andrey Panin. --HG-- branch : HEAD