Re: [fossil-users] commit signing

2013-08-29 Thread Eric Rubin-Smith
If you guys are going to get into this more deeply, you should probably
also consider revocation issues.  That is, what happens when it is
discovered that a contributor's private key has been compromised?

The discovery date of the compromise is obviously = the compromise date.
As such, some set of prior check-ins were signed while the key was
compromised.  So you need to figure out how to deal with those check-ins.
Do you display them differently, or shun them, or so on.

On the other hand, you're not going to address every possible threat model
with your system.  For example, you are not going to prevent rubber-hose
attacks on contributors.

If you haven't already, you should probably enumerate exactly what threat
models you care about.  Only then can you reason clearly about whether you
are protecting against such threats.

I'd imagine, since one of fossil's primary purposes seems to revolve around
preserving a clear and unimpeachable chain of intellectual property
ownership, that you'll want to come up with specific potential attacks on
that chain and figure out if you are preventing them.

See here for an example of a well-defined model, arranged as a tree:
http://tldp.org/HOWTO/Disk-Encryption-HOWTO/introduction.html#ThreatModel

Eric
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] database disk image is malformed?

2013-08-29 Thread David Given
This is head-scratchingly weird:

dg@hilfy:/tmp$ fossil clone
https://dg%40cowlark.com:pass@fossil-scm.org fossil.fossil
Bytes  Cards  Artifacts Deltas
Sent:  53  1  0  0
Received: 4000570  12097   1288   4774
Sent:  71  2  0  0
Error: Database error: SQL error: database disk image is malformed
Received:  74  1  0  0
Total network traffic: 548 bytes sent, 4000963 bytes received
fossil: server returned an error - clone aborted

OTOH:

dg@hilfy:/tmp$ fossil clone https://fossil-scm.org fossil.fossil
Bytes  Cards  Artifacts Deltas
Sent:  53  1  0  0
Received: 4000570  12097   1288   4774
Sent:  71  2  0  0
Received: 4064285  13221   2203   4370
Sent:  57 95  0  0
...etc...

That's on my desktop PC, which is amd64 running Debian, so that's fossil
1.22. OTOH my ARM server box runs more-or-less tip, and it happens there
too:

dg@anify:/tmp$ fossil clone
https://dg%40cowlark.com:pass@fossil-scm.org fossil.fossil
Error: Database error: SQL error: database disk image is malformed
Round-trips: 2   Artifacts sent: 0  received: 6062
Clone finished with 548 bytes sent, 4000963 bytes received
fossil: server returned an error - clone aborted

This isn't a blocking issue because I can always clone anonymously and
then sync with the username and password, but can anyone reproduce this?

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ Ripley's Law: Never go further for the cat than the cat would go for
│ you. --- Vexxarr Bleen (trans. Hunter Cressall)



signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread Stephan Beal
On Thu, Aug 29, 2013 at 10:10 PM, David Given d...@cowlark.com wrote:

 This is head-scratchingly weird:

 dg@hilfy:/tmp$ fossil clone
 https://dg%40cowlark.com:pass@fossil-scm.org fossil.fossil
 Bytes  Cards  Artifacts Deltas
 Sent:  53  1  0  0
 Received: 4000570  12097   1288   4774
 Sent:  71  2  0  0
 Error: Database error: SQL error: database disk image is malformed


Me, too:

[stephan@host:~/tmp]$ fossil clone http://stephan:x...@fossil-scm.orgf.fsl
Round-trips: 2   Artifacts sent: 0  received: 6062
Error: Database error: SQL error: database disk image is malformed
Round-trips: 2   Artifacts sent: 0  received: 6062
Clone finished with 542 bytes sent, 4000963 bytes received
server returned an error - clone aborted

:-?

Update from my primary clone works fine.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread Stephan Beal
On Thu, Aug 29, 2013 at 10:24 PM, Stephan Beal sgb...@googlemail.comwrote:

 [stephan@host:~/tmp]$ fossil clone http://stephan:x...@fossil-scm.orgf.fsl
 Round-trips: 2   Artifacts sent: 0  received: 6062
 Error: Database error: SQL error: database disk image is malformed


BTW:

[stephan@host:~/cvs/fossil/fossil]$ f ver
This is fossil version 1.26 [669f22fb7c] 2013-08-27 13:50:02 UTC

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread Richard Hipp
The database has gone corrupt on the server.  Give me a few minutes to
figure out what it going on.


On Thu, Aug 29, 2013 at 4:24 PM, Stephan Beal sgb...@googlemail.com wrote:

 On Thu, Aug 29, 2013 at 10:10 PM, David Given d...@cowlark.com wrote:

 This is head-scratchingly weird:

 dg@hilfy:/tmp$ fossil clone
 https://dg%40cowlark.com:pass@fossil-scm.org fossil.fossil
 Bytes  Cards  Artifacts Deltas
 Sent:  53  1  0  0
 Received: 4000570  12097   1288   4774
 Sent:  71  2  0  0
 Error: Database error: SQL error: database disk image is malformed


 Me, too:

 [stephan@host:~/tmp]$ fossil clone http://stephan:x...@fossil-scm.orgf.fsl
  Round-trips: 2   Artifacts sent: 0  received: 6062
 Error: Database error: SQL error: database disk image is malformed
 Round-trips: 2   Artifacts sent: 0  received: 6062
 Clone finished with 542 bytes sent, 4000963 bytes received
  server returned an error - clone aborted

 :-?

 Update from my primary clone works fine.

 --
 - stephan beal
 http://wanderinghorse.net/home/stephan/
 http://gplus.to/sgbeal

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread Richard Hipp
A corruption occurred in the CONCEALED table on the server.  Still don't
know how that happened.  I have fixed the table and so downloads should be
working again.  Continuing to investigate the source of corruption.

Additional information:

(1) All of the other 77 fossil repositories on that server have been
checked and are working fine.

(2) The CONCEALED table maps SHA1 hashes of user email address back into
their the original email address.  It allows emails to be stored in tickets
using the SHA1 hash of the email address rather than the literal text.

(3) This has never happened before.


On Thu, Aug 29, 2013 at 4:27 PM, Richard Hipp d...@sqlite.org wrote:

 The database has gone corrupt on the server.  Give me a few minutes to
 figure out what it going on.


 On Thu, Aug 29, 2013 at 4:24 PM, Stephan Beal sgb...@googlemail.comwrote:

 On Thu, Aug 29, 2013 at 10:10 PM, David Given d...@cowlark.com wrote:

 This is head-scratchingly weird:

 dg@hilfy:/tmp$ fossil clone
 https://dg%40cowlark.com:pass@fossil-scm.org fossil.fossil
 Bytes  Cards  Artifacts Deltas
 Sent:  53  1  0  0
 Received: 4000570  12097   1288   4774
 Sent:  71  2  0  0
 Error: Database error: SQL error: database disk image is malformed


 Me, too:

 [stephan@host:~/tmp]$ fossil clone 
 http://stephan:x...@fossil-scm.orgf.fsl
  Round-trips: 2   Artifacts sent: 0  received: 6062
 Error: Database error: SQL error: database disk image is malformed
 Round-trips: 2   Artifacts sent: 0  received: 6062
 Clone finished with 542 bytes sent, 4000963 bytes received
  server returned an error - clone aborted

 :-?

 Update from my primary clone works fine.

 --
 - stephan beal
 http://wanderinghorse.net/home/stephan/
 http://gplus.to/sgbeal

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




 --
 D. Richard Hipp
 d...@sqlite.org




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread Richard Hipp
The database corruption was caused by scenario 1.1 at
http://www.sqlite.org/howtocorrupt.html.

Apparently, file descriptor 2 was closed.  Then SQLite used file descriptor
2 to open a connection to the database file.  Then an assert() failed,
wrote to file descriptor 2, and overwrote a portion of the CONCEALED
table.  At the beginning of one page of the CONCEALED table we see this
text:

 fossil: ../m1/src/blob.c:253: blob_str: Assertion
`(p)-xRealloc==blobReallocMalloc || (p)-xRealloc=blobReallocStatic'
failed.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread Stephan Beal
On Thu, Aug 29, 2013 at 10:50 PM, Richard Hipp d...@sqlite.org wrote:

 The database corruption was caused by scenario 1.1 at
 http://www.sqlite.org/howtocorrupt.html.


Another thread?


 Apparently, file descriptor 2 was closed.  Then SQLite used file
 descriptor 2 to open a connection to the database file.  Then an assert()
 failed, wrote to file descriptor 2, and overwrote a portion of the
 CONCEALED table.  At the beginning of one page of the CONCEALED table we
 see this text:

  fossil: ../m1/src/blob.c:253: blob_str: Assertion
 `(p)-xRealloc==blobReallocMalloc || (p)-xRealloc=blobReallocStatic'
 failed.



That assertion can be triggered from about a thousand places :/. If you can
give us a stack trace or tell us what operation triggered it, i can try to
reproduce it locally.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread Richard Hipp
Cross-posting to sqlite-dev


On Thu, Aug 29, 2013 at 4:56 PM, Stephan Beal sgb...@googlemail.com wrote:

 On Thu, Aug 29, 2013 at 10:50 PM, Richard Hipp d...@sqlite.org wrote:

 The database corruption was caused by scenario 1.1 at
 http://www.sqlite.org/howtocorrupt.html.


 Another thread?


 Apparently, file descriptor 2 was closed.  Then SQLite used file
 descriptor 2 to open a connection to the database file.  Then an assert()
 failed, wrote to file descriptor 2, and overwrote a portion of the
 CONCEALED table.  At the beginning of one page of the CONCEALED table we
 see this text:

  fossil: ../m1/src/blob.c:253: blob_str: Assertion
 `(p)-xRealloc==blobReallocMalloc || (p)-xRealloc=blobReallocStatic'
 failed.



 That assertion can be triggered from about a thousand places :/. If you
 can give us a stack trace or tell us what operation triggered it, i can try
 to reproduce it locally.


It would be nice to fix the cause of the assertion, yes.  But I am
significantly more worried that an assertion firing can overwrite and
corrupt the database file!

Perhaps SQLite should be modified so that it will not accept file
descriptor 0, 1, or 2 for use with a database file?

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread Joerg Sonnenberger
On Thu, Aug 29, 2013 at 04:50:19PM -0400, Richard Hipp wrote:
 The database corruption was caused by scenario 1.1 at
 http://www.sqlite.org/howtocorrupt.html.
 
 Apparently, file descriptor 2 was closed.

The question for me would be why. That should not happen and any code
should at most re-open fd 2 as /dev/null...

Joerg
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread Richard Hipp
On Thu, Aug 29, 2013 at 5:33 PM, Joerg Sonnenberger jo...@britannica.bec.de
 wrote:

 On Thu, Aug 29, 2013 at 04:50:19PM -0400, Richard Hipp wrote:
  The database corruption was caused by scenario 1.1 at
  http://www.sqlite.org/howtocorrupt.html.
 
  Apparently, file descriptor 2 was closed.

 The question for me would be why. That should not happen and any code
 should at most re-open fd 2 as /dev/null...


That is a question I've been looking into but do not yet have an answer for.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Ticket system

2013-08-29 Thread Jan Jurak
Dear developers,

First thank you for nice piece of software. I am using fossil for some
of my projects and some users wants more featured ticket system. For
example spent time for solving the issue. What is your opinion on
that. I am trying avoid installing another software.
TIA

-- 
Regards
Jan Jurák
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] 'fossil sqlite3' db init issues

2013-08-29 Thread David Given
I've found a minor bug in the way the patched sqlite3 shell handles
opening the db. In particular, this code from shell.c:

  if( data.zDbFilename==0 ){
#ifndef SQLITE_OMIT_MEMORYDB
data.zDbFilename = :memory:;
#else
fprintf(stderr,%s: Error: no database filename specified\n, Argv0);
return 1;
#endif
/* Begin Fossil Patch */
{
  extern void fossil_open(const char **);
  fossil_open(data.zDbFilename);
}
/* End Fossil Patch */
  }

  if( access(data.zDbFilename, 0)==0 ){
open_db(data);
  }

This is manifesting in a particularly confusing way. Specifically:

(a) 'fossil sqlite3' calls sqlcmd_autoinit
(b) 'fossil sqlite3 foo.fossil' does not

What's happening with (a), I think, is that fossil_open is opening
:memory:, which registers the autoinit handler, and then further down
the database is reopened with open_db which calls the handler.

However, with (b), :memory: is not being opened at all, therefore the
handler is not being registered, so open_db doesn't call it.

I enclose a patch which I think fixes it; please comment...

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ Ripley's Law: Never go further for the cat than the cat would go for
│ you. --- Vexxarr Bleen (trans. Hunter Cressall)
--- src/shell.c
+++ src/shell.c
@@ -3230,27 +3230,25 @@
 data.zDbFilename = :memory:;
 #else
 fprintf(stderr,%s: Error: no database filename specified\n, Argv0);
 return 1;
 #endif
-/* Begin Fossil Patch */
-{
-  extern void fossil_open(const char **);
-  fossil_open(data.zDbFilename);
-}
-/* End Fossil Patch */
   }
+
   data.out = stdout;
 
   /* Go ahead and open the database file if it already exists.  If the
   ** file does not exist, delay opening it.  This prevents empty database
   ** files from being created if a user mistypes the database name argument
   ** to the sqlite command-line tool.
   */
-  if( access(data.zDbFilename, 0)==0 ){
-open_db(data);
+  /* Begin Fossil Patch */
+  {
+extern void fossil_open(const char **);
+fossil_open(data.zDbFilename);
   }
+  /* End Fossil Patch */
 
   /* Process the initialization file if there is one.  If no -init option
   ** is given on the command line, look for a file named ~/.sqliterc and
   ** try to process it.
   */



signature.asc
Description: OpenPGP digital signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Ticket system

2013-08-29 Thread Eric Rubin-Smith
On Thu, Aug 29, 2013 at 6:02 PM, Jan Jurak yan.ju...@gmail.com wrote:

 Dear developers,

 First thank you for nice piece of software. I am using fossil for some
 of my projects and some users wants more featured ticket system. For
 example spent time for solving the issue. What is your opinion on
 that. I am trying avoid installing another software.


You can easily extend the info tracked by fossil to include that:
http://www.fossil-scm.org/index.html/doc/trunk/www/custom_ticket.wiki
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread B Harder
Did this nuke accounts/passwords ?

On 8/29/13, Richard Hipp d...@sqlite.org wrote:
 On Thu, Aug 29, 2013 at 5:33 PM, Joerg Sonnenberger
 jo...@britannica.bec.de
 wrote:

 On Thu, Aug 29, 2013 at 04:50:19PM -0400, Richard Hipp wrote:
  The database corruption was caused by scenario 1.1 at
  http://www.sqlite.org/howtocorrupt.html.
 
  Apparently, file descriptor 2 was closed.

 The question for me would be why. That should not happen and any code
 should at most re-open fd 2 as /dev/null...


 That is a question I've been looking into but do not yet have an answer
 for.

 --
 D. Richard Hipp
 d...@sqlite.org



-- 
Brad Harder
Method Logic Digital Consulting
http://www.methodlogic.net/
http://twitter.com/bcharder
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread Richard Hipp
On Thu, Aug 29, 2013 at 10:59 PM, B Harder brad.har...@gmail.com wrote:

 Did this nuke accounts/passwords ?


Possibly.  I restored from backup.  But if passwords changed recently, the
backup might have missed them.


-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread B Harder
I don't know what the definition of recent is, but I think my password is
same for months, wasn't working at time I sent last msg. I'll work with you
off-list if necessary.

Thanks drh,

-bch
On Aug 29, 2013 8:12 PM, Richard Hipp d...@sqlite.org wrote:




 On Thu, Aug 29, 2013 at 10:59 PM, B Harder brad.har...@gmail.com wrote:

 Did this nuke accounts/passwords ?


 Possibly.  I restored from backup.  But if passwords changed recently, the
 backup might have missed them.


 --
 D. Richard Hipp
 d...@sqlite.org

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Fossil authentication doesn't seem to be required

2013-08-29 Thread isaac . news
I've setup a local fossil repository by exactly following these
instructions:



[1]http://write.intellectualmollusc.net/2010/01/setting-up-a-fossil-rep
ository-on-a-public-shared-server/



The server's repository was cloned from a temporary copy of the
original repo. I am able to push new changes into this properly through
the CGI interface using a username and password.



However, when I pull up my CGI interface in a browser, I am able to
fully browse all contents of the file without needing to put in a
username or password.



Check my access logs, the requests are not somehow coming from loopback
- they are indeed coming from a remote IP.



How is this possible and what should I do to fix it? My understanding
was that by default any request that isn't from loopback would require
a username and password in order to view anything. Is that incorrect?



Turning on the Require password for local access option has not
effect on this (as I don't expect it should).



Thanks in advance for any help!



IJR

References

1. 
http://write.intellectualmollusc.net/2010/01/setting-up-a-fossil-repository-on-a-public-shared-server/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] database disk image is malformed?

2013-08-29 Thread Richard Hipp
On Fri, Aug 30, 2013 at 12:35 AM, B Harder brad.har...@gmail.com wrote:

 I don't know what the definition of recent is, but I think my password
 is same for months, wasn't working at time I sent last msg. I'll work with
 you off-list if necessary.


I'm still working on the problem.  I'll get it fixed as quickly as I can.
Sorry for the inconvenience.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users