Difference between revisions of "CGUL"

From PDP/Grid Wiki
Jump to navigationJump to search
m
 
(5 intermediate revisions by 2 users not shown)
Line 18: Line 18:
 
* Header files should not contain memory allocation or initializers
 
* Header files should not contain memory allocation or initializers
 
* The use of global variables is highly discouraged
 
* The use of global variables is highly discouraged
* Code should be commented using Doxygen syntax [http://www.agapow.net/programming/all-the-rest/doxygen-cheatsheet Cheat sheet]
+
* Code should be commented using Doxygen syntax ([http://www.agapow.net/programming/all-the-rest/doxygen-cheatsheet Cheat sheet])
 
* Logging should only be done through CGUL logging function
 
* Logging should only be done through CGUL logging function
 
* The use of stdout or stderr directly is highly discouraged - stderr may only be accessed through the logging function
 
* The use of stdout or stderr directly is highly discouraged - stderr may only be accessed through the logging function
Line 27: Line 27:
  
 
== Unresolved issues ==
 
== Unresolved issues ==
=== Code licensing ===
+
=== Code authorship attribution ===
IANAL, but...
+
Next to including a general AUTHORS file, it might be possible to generate a list of specific authors per file using 'svn blame' information. This can be catted into the source code files in a make task.
  
The gLite project dictates that all shipped source code files should include a license ([http://www.apache.org/licenses/ the Apache license]).
+
== SVN Activity ==
Because this license occasionally gets updated it could be problematic to simply cat a LICENSE file into the source code files when 'make dist' is ran, as the original authors (who might have left Nikhef) need to sign off on the licensing change.
 
  
=== Code authorship attribution ===
+
View into SVN [https://ndpfsvn.nikhef.nl/cgi-bin/viewvc.cgi/pdpsoft/trunk/grid-mw-security/cgul/?view=log grid-mw-security/cgul]
Next to including a general AUTHORS file, it might be possible to generate a list of specific authors per file using 'svn blame' information. This can be catted into the source code files as described under 'Code licensing'.
 

Latest revision as of 12:37, 28 January 2010

CGUL: The C Grand Unified Library

File:Cgul.jpg
Actually an albatros

Purpose

The CGUL's purpose is to centralize library code used by various security middleware components.

Features

  • Access to Unix privilege information
  • Networking
  • File handling
  • Logging
  • SSL wrappers

C code conventions

  • Code should be portable across POSIX-compliant platforms
  • Header files should be regarded as documentation
  • Prototypes in header files should contain variable names for clarity
  • Header files should not contain memory allocation or initializers
  • The use of global variables is highly discouraged
  • Code should be commented using Doxygen syntax (Cheat sheet)
  • Logging should only be done through CGUL logging function
  • The use of stdout or stderr directly is highly discouraged - stderr may only be accessed through the logging function
  • Comments should describe whether use of a standard library function is thread-safe or not
  • Comments should describe relevant or non-obvious side effects of a standard library function
  • Thread-safe functions should have their names suffixed with '_r'
  • Internal components of the CGUL should not depend on each other (except maybe logging)

Unresolved issues

Code authorship attribution

Next to including a general AUTHORS file, it might be possible to generate a list of specific authors per file using 'svn blame' information. This can be catted into the source code files in a make task.

SVN Activity

View into SVN grid-mw-security/cgul