In my lecture I learned that the action that can be applied to the light ray is written like below: \begin{equation*} S[x;e]=(1/2)\int [(1/e)g_{ab}\dot x^a\dot x^b-m^2e]ds \tag{1} \end{equation*} where $s$ is the variable that replaces the role of time and $e(s)>0$ is said to be another auxiliary variable that is similar to the Lagrange multiplier. The dot symbol on $x$ means differentiation with respect to $s$ and $a$,$b$ ranges from $0$ to $3$.
Then, when $m>0$, the lecture note sets $$\frac{\delta S}{\delta e}=0\tag{2}$$ and derive $$(-g_{ab}\dot x^a\dot x^b)/e^2-m^2=0.\tag{3}$$
Here is my question. What on earth does $\frac{\delta S}{\delta e}$ mean? And why set it zero? Isn't it that usually that $\delta S=0$? I am very confused.