CfgTie

 view release on metacpan or  search on metacpan

bin/mail-validate  view on Meta::CPAN

  {
    phase1 => "Phase 1: Checking mail spool area permissions\n",
    phase2 => "Phase 2: Scanning the file names of the mail spool area\n",
    phase3 => "Phase 3: Checking the files ownership, permissions, and type\n",
    okay1  => "Looks okay\n",
    mailodd=> "Mail spool folder has unusual permisions\n",
    allwrite=>"The whole world can write to it\n",
    stickymissing=>
	"The sticky bit is not set: this should be set to make sure".
	" only the owners of\n..the files can delete them\n",
    spoolrec =>"Recommend using chmod'ing to permissions of 1775\n",
    spoolwhy =>"This will allow everyone to read and write the proper files\n".
     "..The general public won't be allowed to do any writing.\n".
     "..The extra 1 on the front will help ensure only the owner the files ".
     "can delete\n..them.\n",
    nouser=> "Mailbox exists for '\\1', but there is no such user\n",
    badgroup=> "Mailbox '\\1' has the wrong group owner.\n",
    badowner=> "Mailbox '\\1' has the wrong owner.\n",
    badperms=> "Mailbox '\\1' has the wrong permissions.\n",
    groupshould=>"Belongs to group '\\1'.  Should be owned by 'mail'\n",
    usershould =>"Belongs to user '\\1'.  Should be owned by '\\2'\n",

lib/CfgTie/filever.pm  view on Meta::CPAN

   my @S =stat $Old;
   #If the old file does exist we need to do a bit of work (we use stat
   #since the other bits of information are relevant too)
   if (scalar @S)
     {
        #Migrate us to some backup copies, use one more than default so we
        #can unroll
        &Roll($Old,$RollDepth+1);

        # Modify the permissions of the new file to match that of the old one.
        if (!chmod($S[2], $New) ||

        # Modify the ownership of the new file to match that of the old one.
            !chown($S[4], $S[5], $New)||

            !rename($New, $Old))
          {
             die "bad things happened: $New doesn't exist? $!\n";
             &Unroll($Old,$RollDepth+1);
             return -1;
          }



( run in 0.309 second using v1.01-cache-2.11-cpan-8d75d55dd25 )