Well, the answer depends on what version of OpenGL and what version of GLSL are you using.
The thing is, if the version of opengl that you’re using supports fixed functionality and you’re not overwriting that with either a vertex or fragment shader, Opengl will try to provide the missing shader by the fixed function counterpart. This is very well documented, actually, because it’s … fixed.
So, to give you an example, for GLSL 1.1 (the one that you’re using unless you specify a #version at the beginning of the shader) you can read in this wonderful free spec
the entire chapter 7 which specifies all the built in variables that you can acces from either the vertex or fragment shader (yes, that was a friendly RTFM ). So, if you only write the fragment shader, opengl fixed function pipeline will write most, if not all (depends on what you enable/disable) builtin variables accesible from the fragment shader and you have to output those that they specify there. On the other hand, if you only provide the vertex shader, you will have to output the propper values into the builtin vars necesary for your desired effect to be computed by the fragment fixed pipeline.
On the other hand, for different OpenGL context/GLSL versions, you might be surprised to find out that they either deprecated or, worse, removed those builtin variables and so therefore you won’t be able to use the fixed pipeline in any of the stages. Probably the best way is to just provide both shaders ( you can find implementations of fixed functionality ones, just copy/paste/modify and smile).