Changeset 3 for server


Ignore:
Timestamp:
Sep 30, 2006, 5:15:09 PM (18 years ago)
Author:
jbarnold
Message:
Added missing bashrc file; added env cleaning
Location:
server
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • server/common/oursrc/sqladm/signup-sql.c

    r1 r3  
    3030        }
    3131
     32#define NUMBUF 5
     33#define BUFLEN 128
     34        char buf[NUMBUF][BUFLEN];
     35        char *env[NUMBUF+1];
     36        int i = 0;
     37        snprintf(buf[i++], BUFLEN-1, "%s=%s", "HOME", "/home/sql");
     38        snprintf(buf[i++], BUFLEN-1, "%s=%s", "TERM", "xterm");
     39        snprintf(buf[i++], BUFLEN-1, "%s=%s", "USER", "sql");
     40        snprintf(buf[i++], BUFLEN-1, "%s=%s", "SHELL", "/usr/local/bin/bash");
     41        snprintf(buf[i++], BUFLEN-1, "%s=%s", "PATH", "/usr/kerberos/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin");
     42        for(i = 0; i < NUMBUF; i++) {
     43                env[i] = buf[i];
     44        }
     45        env[i] = NULL;
     46
    3247        char uid[21]; // 64-bit uid requires 21
    3348        char gid[21]; // 64-bit gid requires 21
     
    5671        }
    5772
    58         execv(SIGNUP_PATH, v);
     73        execle(SIGNUP_PATH, v, env);
    5974        return 1;
    6075}
  • server/fedora/specs/lockeradm.spec

    r2 r3  
    3232install -D signup-scripts-frontend $RPM_BUILD_ROOT/usr/local/sbin/signup-scripts-frontend
    3333install -D signup-scripts-backend $RPM_BUILD_ROOT/usr/local/sbin/signup-scripts-backend
     34install -D bashrc $RPM_BUILD_ROOT/usr/local/etc/bashrc
    3435
    3536%clean
     
    3839%files
    3940%defattr(0644, root, root)
     41/usr/local/etc/bashrc
    4042%defattr(0755, root, root)
    4143/usr/local/sbin/admof
Note: See TracChangeset for help on using the changeset viewer.