Bitcoin Forum
May 26, 2024, 01:29:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why is secp256k1.c executable?  (Read 653 times)
Blinken (OP)
Sr. Member
****
Offline Offline

Activity: 338
Merit: 253



View Profile
March 17, 2017, 02:48:22 PM
Merited by ABCbits (1)
 #1

In the bitcoin core, the critical secp256k1.c file is marked as executable (see https://github.com/bitcoin-core/secp256k1/blob/master/src/secp256k1.c)

Is this just a screw up or is there a valid reason for this?

The change appears to have been made by Peter Dettman. (see https://github.com/peterdettman/secp256k1/commit/0f9e69db555ea35b90f49fa48925c366261452ec)

Bitcoin ♦♦♦ Trust in Mathematics, Not Bankers ♦♦♦
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3402
Merit: 6657


Just writing some code


View Profile WWW
March 17, 2017, 03:19:33 PM
 #2

What do you mean "marked as executable"? What is marking it as an executable? What is telling you that? The file is a text file, it can't be executable.

Blinken (OP)
Sr. Member
****
Offline Offline

Activity: 338
Merit: 253



View Profile
March 17, 2017, 03:43:34 PM
Merited by ABCbits (2)
 #3

In the unix operating system, there is a "file permission" system that allows files to be marked as "executable" by either the file owner, the owner's group or everyone.

The git version control system supports preservation and propagation of that system and stores changes and state of each files unix-like permissions.

The current revision of secp256k1.c is marked as having executable permissions on the owner, group and everyone levels. This can be clearly seen in the system header of the originally linked github page. The commit where this change was made to the file was also linked.

Bitcoin ♦♦♦ Trust in Mathematics, Not Bankers ♦♦♦
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3402
Merit: 6657


Just writing some code


View Profile WWW
March 17, 2017, 03:51:26 PM
 #4

The current revision of secp256k1.c is marked as having executable permissions on the owner, group and everyone levels. This can be clearly seen in the system header of the originally linked github page. The commit where this change was made to the file was also linked.
Ah. I see it now. It's probably just a mistake/oversight from one of the contributors. There isn't anything in the file that can be executed as is.

peterdettman
Newbie
*
Offline Offline

Activity: 1
Merit: 1


View Profile
March 18, 2017, 06:35:53 AM
Merited by ABCbits (1)
 #5

Quote
The change appears to have been made by Peter Dettman.

Please note that I was not the commit author, I merely pulled it into my fork, as should have been clear from the github link. In any case, it appears there is now a PR to fix it: https://github.com/bitcoin-core/secp256k1/pull/449 .
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!