grr/server/grr_response_server/flows/general/hardware.py
def DeleteTemporaryImage(self, responses):
    """Remove the temporary image from the client."""
    if not responses.success:
      raise flow.FlowError("Unable to collect the flash image: {0}".format(
          responses.status))

    response = responses.First()
    self.SendReply(response)

    # Writing files (or symlinks) into random places is not supported anymore in
    # the relational db schema. We are going to replace this with annotations
    # for collected temp files soon.
    if data_store.AFF4Enabled():
      # Update the symbolic link to the new instance.
      with aff4.FACTORY.Create(
          self.client_urn.Add("spiflash"), aff4.AFF4Symlink,
          token=self.token) as symlink:
        symlink.Set(symlink.Schema.SYMLINK_TARGET,
                    response.AFF4Path(self.client_urn))

    # Clean up the temporary image from the client.
    self.CallClient(
        server_stubs.DeleteGRRTempFiles,
        responses.request_data["image_path"],
        next_state="TemporaryImageRemoved")
Remove the temporary image from the client.
Remove the temporary image from the client.
Remove the temporary image from the client .
def DeleteTemporaryImage(self, responses):
    if not responses.success:
      raise flow.FlowError("Unable to collect the flash image: {0}".format(
          responses.status))
    response = responses.First()
    self.SendReply(response)
    if data_store.AFF4Enabled():
      with aff4.FACTORY.Create(
          self.client_urn.Add("spiflash"), aff4.AFF4Symlink,
          token=self.token) as symlink:
        symlink.Set(symlink.Schema.SYMLINK_TARGET,
                    response.AFF4Path(self.client_urn))
    self.CallClient(
        server_stubs.DeleteGRRTempFiles,
        responses.request_data["image_path"],
        next_state="TemporaryImageRemoved")
def DeleteTemporaryImage ( self , responses ) : if not responses . success : raise flow . FlowError ( "Unable to collect the flash image: {0}" . format ( responses . status ) ) response = responses . First ( ) self . SendReply ( response ) if data_store . AFF4Enabled ( ) : with aff4 . FACTORY . Create ( self . client_urn . Add ( "spiflash" ) , aff4 . AFF4Symlink , token = self . token ) as symlink : symlink . Set ( symlink . Schema . SYMLINK_TARGET , response . AFF4Path ( self . client_urn ) ) self . CallClient ( server_stubs . DeleteGRRTempFiles , responses . request_data [ "image_path" ] , next_state = "TemporaryImageRemoved" )
Remove the temporary image from the client.
Remove the temporary image from the client .
"""Remove the temporary image from the client.""" # Writing files (or symlinks) into random places is not supported anymore in # the relational db schema. We are going to replace this with annotations # for collected temp files soon. # Update the symbolic link to the new instance. # Clean up the temporary image from the client.
self
responses