Changeset 719


Ignore:
Timestamp:
Nov 2, 2012, 6:56:43 PM (13 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: smblogon initial commit

Location:
trunk/guitools
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/shared/cltinit.vrs

    r675 r719  
    145145       (\VRFileExists(samba.!bin'\lib\valid.dat')) then call _ErrorDataFileNotFound 'upcase table files not present.'
    146146
     147    /* the password files - we'll create them if they don't exist */
     148    samba.!masterpasswd = unixetc'\master.passwd'
     149    if \VRFileExists(samba.!masterpasswd) then call _ErrorDataFileNotFound 'Could not find "'samba.!masterpasswd'"!'
     150    IF options.!debug == 1 then say '  master.passwd  = "'samba.!masterpasswd'"'
     151
     152    samba.!pwddb = unixetc'\pwd.db'
     153    if \VRFileExists(samba.!pwddb) then call _ErrorDataFileNotFound 'Could not find "'samba.!pwddb'"!'
     154    IF options.!debug == 1 then say '  pwd.db         = "'samba.!pwddb'"'
     155
     156    samba.!spwddb = unixetc'\spwd.db'
     157    if \VRFileExists(samba.!spwddb) then call _ErrorDataFileNotFound 'Could not find "'samba.!spwddb'"!'
     158    IF options.!debug == 1 then say '  spwd.db        = "'samba.!spwddb'"'
     159
     160    samba.!group = unixetc'\group'
     161    if \VRFileExists(samba.!group) then call _ErrorDataFileNotFound 'Could not find "'samba.!group'"!'
     162    IF options.!debug == 1 then say '  group          = "'samba.!group'"'
     163
     164    samba.!printcap = unixetc'\printcap'
     165    if \VRFileExists(samba.!printcap) then call _ErrorDataFileNotFound 'Could not find "'samba.!printcap'"!'
     166    IF options.!debug == 1 then say '  printcap       = "'samba.!printcap'"'
     167
    147168    /* Create these directories to make sure they do exist */
    148169    ok = SysMkDir(unixetc)
  • trunk/guitools/shared/sambainit.vrs

    r675 r719  
    384384    IF options.!debug == 1 then say time()' _SambaRunning() done'
    385385return runres
    386 
    387 /*:VRX */
    388 _PasswordDbRewrite:
    389     IF options.!debug == 1 then say time()' _PasswordDBRewrite() started'
    390 
    391     /* Reset any old rc from pwd_mkdb.exe */
    392     pwd_mkdbrc = 0
    393 
    394     /* delete old .db.tmp files */
    395     ok = SysFileDelete(UnixETC'\pwd.db.tmp')
    396     ok = SysFileDelete(UnixETC'\spwd.db.tmp')
    397 
    398     /* create backups of old .db files */
    399     ok = VRCopyFile( UnixETC'\pwd.db',  UnixETC'\pwd.db.bak'  )
    400     ok = VRCopyFile( UnixETC'\spwd.db', UnixETC'\spwd.db.bak' )
    401 
    402     /* delete old .db files */
    403     ok = SysFileDelete(UnixETC'\pwd.db')
    404     ok = SysFileDelete(UnixETC'\spwd.db')
    405 
    406     /* Create new password db */
    407     address cmd samba.!pwd_mkdb' -d 'unixetc' 'samba.!masterpasswd' 2>'samba.!error
    408     pwd_mkdbrc = rc
    409     if \VRFileExists(samba.!pwddb) | pwd_mkdbrc <> 0 then do
    410         call _SambaShowError
    411     end
    412     IF options.!debug == 1 then say time()" _PasswordDBRewrite() done ("pwd_mkdbrc")"
    413 return
Note: See TracChangeset for help on using the changeset viewer.