/[pdpsoft]/trunk/grid-mw-security/cgul/fileutil/fileutil.c
ViewVC logotype

Log of /trunk/grid-mw-security/cgul/fileutil/fileutil.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 1905 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 31 12:44:47 2010 UTC (11 years, 9 months ago) by msalle
File length: 26560 byte(s)
Diff to previous 1892
- prevent "warning: unused variable `lck'"


Revision 1892 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 24 12:36:17 2010 UTC (11 years, 10 months ago) by msalle
File length: 26532 byte(s)
Diff to previous 1879
- Forcing umask for cgul_mkdir_with_parents() and cgul_open_logfile() to be
  identical to the specified modes, so forcing it to be not stricter than the
  specified mode.


Revision 1879 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 13 13:37:40 2010 UTC (11 years, 10 months ago) by msalle
File length: 26174 byte(s)
Diff to previous 1857
Adding new function:
 cgul_open_logfile()
opens a logfile, root-owned, with suitable checks, using J. Kupsch library.



Revision 1857 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 16 16:46:43 2010 UTC (11 years, 11 months ago) by msalle
File length: 21679 byte(s)
Diff to previous 1829
Syncing with fileutil in glexec. Note that there were a few issues with the
wrong groups being added:
- Rewritten trusted/confidential checks for cgul_read_config, to make it more
  consistent and solve a number of unclear situations and inconsistencies.
    * confidentiality check is now only enabled when a macro
      DEMAND_CONFIG_CONFIDENTIAL is defined.
    * Only trusted user and root are trusted for read/write. The trusted group is
      not trusted for writing.
    * When in addition a confidentiality check is done, the file may ONLY be
      readable for the trusted users, the trusted groups and the effective gid,
      the latter only when different from real gid.
- Adding a #ifdef around 2 variable definitions to prevent 'unused variable'
  warnings.
- Allow to 'drop' privilege to root group when needed.
- properly deal with negative 'gid's' (use int and cast at the right place).



Revision 1829 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 30 12:58:45 2010 UTC (11 years, 11 months ago) by msalle
File length: 20318 byte(s)
Diff to previous 1809
- Fix wrong return code for read_config: missing file should NOT be a privilege
  drop error but a I/O error.



Revision 1809 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 22 10:15:54 2010 UTC (12 years ago) by msalle
File length: 20135 byte(s)
Diff to previous 1516
flock() doesn't work on Solaris, so always return error.



Revision 1516 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 18 14:18:14 2010 UTC (12 years, 4 months ago) by msalle
File length: 20060 byte(s)
Diff to previous 1515
- updated comment


Revision 1515 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 18 14:08:32 2010 UTC (12 years, 4 months ago) by msalle
File length: 20023 byte(s)
Diff to previous 1514
- Heavily improved mkdir_with_parents function for crippled automount behaviour.



Revision 1514 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 18 13:30:13 2010 UTC (12 years, 4 months ago) by msalle
File length: 19728 byte(s)
Diff to previous 1510
- resync-ed with glexec: lstat -> stat etc.


Revision 1510 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Feb 14 12:31:32 2010 UTC (12 years, 4 months ago) by msalle
File length: 19471 byte(s)
Diff to previous 1503
Bringing fileutil back in sync with version in gLExec



Revision 1503 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 10 23:32:47 2010 UTC (12 years, 4 months ago) by msalle
File length: 18493 byte(s)
Diff to previous 1498
- cgul_write_uniq_proxy now updates the template such that one can figure out
  the actual filename



Revision 1498 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 10 15:44:18 2010 UTC (12 years, 4 months ago) by msalle
File length: 18661 byte(s)
Diff to previous 1493
- Updated the API for the proxy reading and config file, after extensively
  looking at use-cases.
  Preferred for config file: 'glexec'.root (or 'scas'.root or whatever), and
  reading as glexec.glexec or glexec.gid
- two writing functions synchronized.


Revision 1493 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 9 22:01:18 2010 UTC (12 years, 4 months ago) by msalle
File length: 17558 byte(s)
Diff to previous 1491
- (almost) no type incompatibilities. Removed 1 potentially dangerous size_t



Revision 1491 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 9 16:30:01 2010 UTC (12 years, 4 months ago) by msalle
File length: 17532 byte(s)
Diff to previous 1486
- introduced cgul_ prefix for environ
- synchronized two proxy writing functions, thereby fixing a const char* writing
  issue (segfault).


Revision 1486 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 9 15:13:55 2010 UTC (12 years, 4 months ago) by msalle
File length: 17261 byte(s)
Diff to previous 1484
- parent directory of to-be-written proxy is created and with right mode.


Revision 1484 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 9 14:54:49 2010 UTC (12 years, 4 months ago) by msalle
File length: 16871 byte(s)
Diff to previous 1476
- LICENSES added
- added ifndef construct to prevent double inclusion
- added many comments
- fixed a few uninitialized variables 
- fixed too small buffer for reading (\0 forgotten)
  also fixed forgotten addition of \0 after reading.
- read_config() now has preferred uid/gid. 0 (root) effectively ignores, because
  root is always trusted (cannot be untrusted).
- priv_drop has int argu's because uid/gid is unsigned.
- same for read_proxy: read_gid is int
- priv_drop now fails when NOT euid==0
- read_config figures out whether switching or not and acts accordingly: in
  switching mode we demand confidential, in non-switching, trusted is good
  enough.
- check on template in write_uniq_proxy: ending with 6 times X
- difference in file mode and dirmode, for same one...
- fixed bug in dir creation, missed last element.



Revision 1476 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 8 16:11:46 2010 UTC (12 years, 4 months ago) by msalle
File length: 13195 byte(s)
Diff to previous 1473
- new function cgul_read_config that reads a config file into a memory buffer
  using J. Kupsch' safefile (only the safe_is_path_trusted_r() )

- hopefully raise all privileges also when failure.

- remove dead code



Revision 1473 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 8 15:00:23 2010 UTC (12 years, 4 months ago) by msalle
File length: 10863 byte(s)
Diff to previous 1470
- Added extra return code -3 for cgul_write_proxy(): permissions error
  Also split opening/changing ownership/mode for this, in this function
- fixed number of missing variable declarations
- fixed number of typos


Revision 1470 - (view) (download) (as text) (annotate) - [select for diffs]
Added Mon Feb 8 12:37:50 2010 UTC (12 years, 4 months ago) by msalle
File length: 10807 byte(s)
- First (preliminary) version of fileutil files: locking, reading/writing proxy
  and directory creation.



This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28