def Main(): paramkeyPassword = "******" cgiEnv = lib_common.CgiEnv({paramkeyPassword: ""}) if lib_util.isPlatformWindows: lib_common.ErrorMessageHtml("smbclient not available on Windows") smbShr = cgiEnv.GetId() password = cgiEnv.get_parameters(paramkeyPassword) nodeSmbShr = lib_common.gUriGen.SmbShareUri(smbShr) grph = cgiEnv.GetGraph() smbDir = "" lib_smbclient.AddFromSmbClient(grph, smbDir, smbShr, password, nodeSmbShr) cgiEnv.OutCgiRdf()
def Main(): paramkeyPassword = "******" cgiEnv = lib_common.ScriptEnvironment("", {paramkeyPassword: ""}) if lib_util.isPlatformWindows: lib_common.ErrorMessageHtml("smbclient not available on Windows") password = cgiEnv.get_parameters(paramkeyPassword) # Top directory, not just the share name. smbFile = cgiEnv.GetId() rootNodeSmb, smbDir, smbShr = lib_smb.SmbBothUriSplit(smbFile) if rootNodeSmb is None: lib_common.ErrorMessageHtml("This is not a shared file:" + smbFile) grph = cgiEnv.GetGraph() lib_smbclient.AddFromSmbClient(grph, smbDir, smbShr, password, rootNodeSmb) cgiEnv.OutCgiRdf()