Changeset 66a8e6d for fedkit


Ignore:
Timestamp:
Nov 19, 2010 12:10:06 PM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
547aa3b
Parents:
881cd02
Message:

be marginally more careful about file permissions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedkit/smbmount.Linux.pl

    r881cd02 r66a8e6d  
    6161        my $ids = $FSTYPE == 'smbfs' ? ",uid=$uid,gid=$gid" : "";
    6262
     63        #We should be even more careful about creating these files securely,
     64        #confirming ownership, etc., but this is run in an restricted
     65        #environment.
    6366        open(PWDFILE, ">/tmp/$user.cifs_creds") ||
    6467            warn "Can't create credentials for $user:$!\n";
    65         print PWDFILE "username=$user\npassword=$pswd\n";
    66         close(PWDFILE);
    6768        chmod(0600, "/tmp/$user.cifs_creds") == 1 ||
    6869            warn "Credential file /tmp/$user.cifs_creds may have " .
    6970                "bad permissions:$!\n";
     71        print PWDFILE "username=$user\npassword=$pswd\n";
     72        close(PWDFILE);
    7073
    7174        print FSTAB "//$SHARE/$user\t";
Note: See TracChangeset for help on using the changeset viewer.