edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Geoff McLane <ubuntu@geoffair.info>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [edbrowse-dev] Threads (fwd)
Date: Sun, 1 Sep 2019 20:37:18 +0200	[thread overview]
Message-ID: <f71d14ff-63c8-575a-a8f6-457adb1121e9@geoffair.info> (raw)
In-Reply-To: <20190731230413.eklhad@comcast.net>

Hi Karl,

We should certainly check the permission bits for 'open()'... the MS 
docs say -
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/open-wopen?view=vs-2019

It seems the perm.bits are ignored unless _O_CREAT is present, then it 
states "If a value other
than some combination _S_IREAD and _S_IWRITE... generates an assert in 
Debug mode and invokes the
invalid parameter handler..."... that seem clear enough...

Now, in W32 stat.h, S_IREAD = 0x0100 and S_IWRITE = 0x0080. You have 
used open() some 18 times in
the source, 10 of those have O_CREAT. It seems 2 of those use 0600, 
which is fine, = 0x180,
but the other 8 use 0666, 0x0B6, which SEEMS bad...

But running my 'b www.nasa.org' it passes thru say lock_fh = 
open(cachLock, O_WRONLY | O_EXCL | O_CREAT, 0666);
many, many times, and MOST of the time it succeeds! And this is in Debug 
mode, so
do NOT understand...

Most example using 0666 are in fetchmail.c, about 5 times, and I have 
never tested that part
of edbrowse...

So do not know if we should be concerned... can you get by using just 
0600? Open question...

Hi Kevin, look forward to your trials to build in W32, from source... I 
do think there are some benefits
in keeping a Windows build... and not just saying so... whether there 
are users or not... but
always provided it does not take too much time and effort... and agree 
with Karl, the port
has yielded some benefits in the past...

Now that I have an edbrowse w32.x64 running, I can try to test my 
ftruncate/truncate DOSLIKE replacements,
in my forks pthreads-w32 branch, which is where this started... will try 
to get to that...

But can someone help me with my Ubuntu build? Here is what I see when 
running it -

~/projects/edbrowse/build$ ./edbrowse
.ebrc: SSL certificate file /etc/ssl/certs/ComSign_CA.pem does not exist 
or is not readable.
edbrowse ready
b www.nasa.org
9194
the curl library returned the following error message while performing 
the requested operation: Problem with the SSL CA cert (path? access rights?)
the curl library returned the following error message while performing 
the requested operation: Problem with the SSL CA cert (path? access rights?)
the curl library returned the following error message while performing 
the requested operation: Problem with the SSL CA cert (path? access rights?)
1
lines 1 through 13 have been added
=
14
,p
{Acheter ce domaine.}

h1 nasa.org

2019 Copyright. All Rights Reserved.

The Sponsored Listings displayed above are served automatically by a third
party. Neither the service provider nor the domain owner maintain any
relationship with the advertisers. In case of trademark issues please 
contact
the domain owner directly (contact information can be found in whois).

{Privacy Policy}


qt
~/projects/edbrowse/build$

So something is wrong!

How do I fix this? I have MANY things in my /etc/ssl/certs/ folder, but 
obviously NOT
a ComSign_CA.pem that it seems to be looking for...

Can I just alter the line in my ~/.ebrc - certfile = 
/etc/ssl/certs/ComSign_CA.pem
to some other file/link... but which one?

Each existing *.pem seems a link to elsewhere, like the most recent -
lrwxrwxrwx 1 root root  61 Dec 23  2018 
/etc/ssl/certs/TrustCor_RootCert_CA-2.pem -> 
/usr/share/ca-certificates/mozilla/TrustCor_RootCert_CA-2.crt

And as mentioned, to even be able to compile edbrowse in ubuntu, I have 
to patch
the CMakeLists.txt with -

```diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5457acd..c0fac06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -165,9 +165,14 @@ if (WIN32)
              message( FATAL_ERROR "*** Thread libray NOT FOUND!" )
          endif()
      else ()
-        message( FATAL "*** Threads NOT FOUNDunable to proceed")
+        message( FATAL_ERROR "*** Threads NOT FOUND! Unable to proceed")
      endif ()
  endif ()
+if (UNIX)
+    find_package(Threads REQUIRED)
+    list(APPEND add_LIBS ${CMAKE_THREAD_LIBS_INIT})
+    message(STATUS "*** list(APPEND add_LIBS ${CMAKE_THREAD_LIBS_INIT})" )
+endif ()

  if (BUILD_EDBR_ODBC) # if the user OPTION ON
      # This module defines
  ```

  Surely any others using cmake MUST run into this problem? Hope
  is can be fixed soon...

  Regards, Geoff.


  reply	other threads:[~2019-09-01 18:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-01  2:58 Kevin Carhart
2019-09-01  3:04 ` Karl Dahlke
2019-09-01 18:37   ` Geoff McLane [this message]
2019-09-02  2:48     ` Karl Dahlke
2019-09-02 18:38       ` Geoff McLane
2019-09-02 18:53         ` Karl Dahlke
  -- strict thread matches above, loose matches on Subject: below --
2019-08-28  5:46 Kevin Carhart
2019-08-28  6:25 ` Karl Dahlke
2019-08-29  3:23   ` Kevin Carhart
2019-08-29 19:46   ` Geoff McLane
2019-08-29 21:05     ` Karl Dahlke
2019-08-30 19:23       ` Geoff McLane
2019-08-30 21:26         ` Karl Dahlke
2019-08-30 22:08         ` Karl Dahlke
2019-08-31 19:05           ` Geoff McLane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f71d14ff-63c8-575a-a8f6-457adb1121e9@geoffair.info \
    --to=ubuntu@geoffair.info \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).