~ubuntu-branches/debian/sid/hplip/sid

« back to all changes in this revision

Viewing changes to base/services.py

  • Committer: Package Import Robot
  • Author(s): Mark Purcell, Till Kamppeter, Mark Purcell
  • Date: 2014-01-19 13:56:10 UTC
  • mfrom: (1.7.5)
  • Revision ID: package-import@ubuntu.com-20140119135610-7vvsrfbm2vfj0u1s
Tags: 3.14.1-1
* New upstream release 
  - CVE-2013-6427: hplip: insecure auto update feature
  - CVE-2013-6402: hplip: insecure temporary file handling in pkit.py

[ Till Kamppeter ]
* debian/control: Changed Depends/Recommends on foomatic-filters to
  "cups-filters (>= 1.0.42) | foomatic-filters" as foomatic-rip has
  moved to cups-filters from version 1.0.42 on (Closes: #734140).

[ Mark Purcell ]
* Ack NMU - thanks ~carnil
* Drop CVE-2013-6402.patch - addressed upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
                log.error("Failed to install plug-in.")
243
243
        except ImportError:
244
244
            log.warn("Import error\n")
 
245
 
 
246
 
 
247
def close_running_hp_processes():
 
248
    # check systray is running?  
 
249
    status,output = utils.Is_Process_Running('hp-systray')
 
250
    if status is True:
 
251
        ok,choice = tui.enter_choice("\nSome HPLIP applications are running. Press 'y' to close applications or press 'n' to quit upgrade(y=yes*, n=no):",['y','n'],'y')
 
252
        if not ok or choice =='n':
 
253
            log.info("Manually close HPLIP applications and run hp-upgrade again.")
 
254
            return False
 
255
 
 
256
        try:
 
257
        # dBus
 
258
            from dbus import SystemBus, lowlevel
 
259
        except ImportError:
 
260
            log.error("Unable to load DBus.")
 
261
            pass
 
262
        else:
 
263
            try:
 
264
                args = ['', '', EVENT_SYSTEMTRAY_EXIT, prop.username, 0, '', '']
 
265
                msg = lowlevel.SignalMessage('/', 'com.hplip.StatusService', 'Event')
 
266
                msg.append(signature='ssisiss', *args)
 
267
                log.debug("Sending close message to hp-systray ...")
 
268
                SystemBus().send_message(msg)
 
269
                time.sleep(0.5)
 
270
            except:
 
271
                log.error("Failed to send DBus message to hp-systray/hp-toolbox.")
 
272
                pass
 
273
 
 
274
    toolbox_status,output = utils.Is_Process_Running('hp-toolbox')
 
275
 
 
276
    if toolbox_status is True:
 
277
        log.error("Failed to close either HP-Toolbox/HP-Systray. Manually close and run hp-upgrade again.")
 
278
        return False
 
279
 
 
280
    return True