attaching a rifle to bones

I have a robot holding a rifle at port arms, in other words two hands are holding the rifle, but I try to animate the model, the rifle jumps to a different location. I have the rifle attached to the left hand and right wrist bone, but only one hand seems to work, the other hand does not hold the rifle in place. Is there a work around this? I want both hands to keep the rifle at port arms while walking.

it’s easier to make an IK solver for the arms then make 2 empties on the rifle where the hands grip it, and give the IK solvers copy loc constraints to the empty. some one else may have a better method, but that’s how i do it. when he needs to put the rifle down, just key the constraints to 0 value.
(edit) the idea being to mostly animate the rifle, and somewhat the arms.